diff tests/automated/syntax-tests.el @ 4855:189fb67ca31a

Create Assert-eq, Assert-equal, etc. These are equivalent to (Assert (eq ...)) but display both the actual value and the expected value of the comparison. Use them throughout the test suite.
author Ben Wing <ben@xemacs.org>
date Thu, 14 Jan 2010 02:18:03 -0600
parents 5e526366d533
children 133e816778ed
line wrap: on
line diff
--- a/tests/automated/syntax-tests.el	Thu Jan 14 01:25:16 2010 -0600
+++ b/tests/automated/syntax-tests.el	Thu Jan 14 02:18:03 2010 -0600
@@ -49,7 +49,7 @@
     (insert string)
     (goto-char point)
     (forward-word 1)
-    (Assert (eq (point) (+ point stop)))))
+    (Assert-eq (point) (+ point stop))))
 
 (with-temp-buffer
   ;; -!- W NW
@@ -77,7 +77,7 @@
   (insert string)
   (let ((point (point)))
     (backward-word 1)
-    (Assert (eq (point) (- point stop)))))
+    (Assert-eq (point) (- point stop))))
 
 (with-temp-buffer
   ;; NW W -!-
@@ -120,7 +120,7 @@
 			 'syntax-table apply-syntax)
       (goto-char point)
       (forward-word 1)
-      (Assert (eq (point) (+ point stop))))))
+      (Assert-eq (point) (+ point stop)))))
 
 ;; test syntax-table extents
 (with-temp-buffer
@@ -143,7 +143,7 @@
   (with-syntax-table (make-syntax-table)
     (insert "foo bar")
     (backward-sexp 1)
-    (Assert (eql (point) 5))))
+    (Assert-eql (point) 5)))
 
 ;; Test forward-comment at buffer boundaries
 ;; #### The second Assert fails (once interpreted, once compiled) on 21.4.9
@@ -156,13 +156,13 @@
     
     (insert "// comment\n")
     (forward-comment -2)
-    (Assert (eq (point) (point-min)))
+    (Assert-eq (point) (point-min))
 
     (let ((point (point)))
       (insert "/* comment */")
       (goto-char point)
       (forward-comment 2)
-      (Assert (eq (point) (point-max)))
+      (Assert-eq (point) (point-max))
 
       ;; this last used to crash
       (parse-partial-sexp point (point-max)))))
@@ -203,7 +203,7 @@
 			 "Unbalanced parentheses"
 			 (backward-up-list-moves-point-from-to 25 nil))
     ;; special-case check that point didn't move
-    (Assert (= (point) 25))))
+    (Assert= (point) 25)))
 
 (loop
   with envvar-not-existing = (symbol-name (gensym "whatever"))