[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 53/255: passing all tests
From: |
Eric Schulte |
Subject: |
[elpa] 53/255: passing all tests |
Date: |
Sun, 16 Mar 2014 01:02:18 +0000 |
eschulte pushed a commit to branch go
in repository elpa.
commit 3431aafdbc4b11f3b9297551bce2909e5f8206f9
Author: Eric Schulte <address@hidden>
Date: Sun May 20 13:31:51 2012 -0400
passing all tests
---
sgf.el | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/sgf.el b/sgf.el
index c7e8395..0e2935b 100644
--- a/sgf.el
+++ b/sgf.el
@@ -162,7 +162,7 @@
(defun parse-trees (str)
(let (cont-p)
- (flet ((my-collect (el) (setq res (append el res))))
+ (flet ((my-collect (el) (setq res (append (nreverse el) res))))
(parse-many parse-tree-part-re str
(let ((m-end (match-end 0)))
(setq cont-p (string= "(" (substring str (1- m-end) m-end)))
@@ -172,7 +172,7 @@
(let* ((start (1- m-end))
(end (closing-paren str start)))
(unless end (error "sgf: parsing w/o end at %d" start))
- (my-collect (nreverse (parse-trees (substring str start
end))))
+ (my-collect (parse-trees (substring str start end)))
(1+ end))
m-end)))))))
@@ -363,7 +363,7 @@
(defun display-sgf-file (path)
(interactive "f")
- (display-sgf (car (read-from-file path))))
+ (display-sgf (read-from-file path)))
(defun sgf-ref (sgf index)
(let ((part sgf))
@@ -536,8 +536,7 @@
[pa][db][eb])")
(tree (parse-trees str)))
(should (= 1 (length tree)))
- (should (= 1 (length (car tree))))
- (should (= 10 (length (caar tree))))))
+ (should (= 10 (length (first tree))))))
(ert-deftest sgf-parse-nested-tree ()
(let* ((str "(;GM[1]FF[4]
@@ -547,12 +546,13 @@
KM[0.0]HA[0]RU[Japanese]AP[GNU Go:3.7.11]
(;AW[ja][oa][pa][db][eb] ;AB[fa][ha][ia][qa][cb]))")
(tree (parse-trees str)))
- (should (= 2 (length tree)))
- (should (= 9 (length (car (first tree)))))
- (should (= 2 (length (car (second tree)))))))
+ (should (= 3 (length tree)))
+ (should (= 9 (length (first tree))))
+ (should (= 6 (length (car (second tree)))))
+ (should (= 6 (length (car (third tree)))))))
(ert-deftest sgf-parse-file-test ()
- (let ((game (car (read-from-file "sgf-files/jp-ming-5.sgf"))))
+ (let ((game (read-from-file "sgf-files/jp-ming-5.sgf")))
(should (= 247 (length game)))))
(ert-deftest sgf-empty-board-to-string-test ()
@@ -581,7 +581,7 @@
(should (string= string (board-to-string board)))))
(ert-deftest sgf-non-empty-board-to-string-test ()
- (let* ((joseki (car (read-from-file "sgf-files/3-4-joseki.sgf")))
+ (let* ((joseki (read-from-file "sgf-files/3-4-joseki.sgf"))
(root (car joseki))
(rest (cdr joseki))
(board (make-board (aget "S" root)))
@@ -613,7 +613,7 @@
(defmacro with-sgf-file (file &rest body)
(declare (indent 1))
- `(let* ((sgf (car (read-from-file ,file)))
+ `(let* ((sgf (read-from-file ,file))
(buffer (display-sgf sgf)))
(unwind-protect (with-current-buffer buffer ,@body)
(should (kill-buffer buffer)))))
- [elpa] 44/255: indentation, (continued)
- [elpa] 44/255: indentation, Eric Schulte, 2014/03/15
- [elpa] 43/255: paren matching, Eric Schulte, 2014/03/15
- [elpa] 49/255: removed debug stuffs, Eric Schulte, 2014/03/15
- [elpa] 47/255: parsing of sgf files with alternative paths working, Eric Schulte, 2014/03/15
- [elpa] 48/255: all tests are passing, Eric Schulte, 2014/03/15
- [elpa] 52/255: more condensed collecting of games w/alternatives, Eric Schulte, 2014/03/15
- [elpa] 51/255: parsing large complex files, Eric Schulte, 2014/03/15
- [elpa] 39/255: passing all tests, Eric Schulte, 2014/03/15
- [elpa] 50/255: whitespace, Eric Schulte, 2014/03/15
- [elpa] 41/255: simplified parse-tree, but not done, Eric Schulte, 2014/03/15
- [elpa] 53/255: passing all tests,
Eric Schulte <=
- [elpa] 54/255: more parsing/syntax tweaks, Eric Schulte, 2014/03/15
- [elpa] 56/255: some utility functions, Eric Schulte, 2014/03/15
- [elpa] 55/255: new approach to parsing sgf files into elisp, Eric Schulte, 2014/03/15
- [elpa] 61/255: passing first 6 tests, Eric Schulte, 2014/03/15
- [elpa] 59/255: passing first two tests, Eric Schulte, 2014/03/15
- [elpa] 62/255: automatically normalize elisp sgf buffers, Eric Schulte, 2014/03/15
- [elpa] 58/255: able to load and play through games w/sgf2el, Eric Schulte, 2014/03/15
- [elpa] 60/255: passing first five tests, Eric Schulte, 2014/03/15
- [elpa] 64/255: passing all tests, Eric Schulte, 2014/03/15
- [elpa] 67/255: support for converting *very* large files, Eric Schulte, 2014/03/15