diff tests/automated/extent-tests.el @ 5136:0f66906b6e37

Undo Assert-equal, Assert=, etc.; make `Assert' handle this automatically -------------------- ChangeLog entries follow: -------------------- lisp/ChangeLog addition: 2010-03-12 Ben Wing <ben@xemacs.org> * test-harness.el (test-harness-from-buffer): Undo change of e.g. (Assert (equalp ...)) to (Assert-equalp ...). Get rid of `Assert-equalp' and friends, `Assert-test', and `Assert-test-not'. Instead, make `Assert' smart enough to do the equivalent functionality when an expression like (Assert (equalp ...)) is seen. tests/ChangeLog addition: 2010-03-12 Ben Wing <ben@xemacs.org> * automated/base64-tests.el (bt-base64-encode-string): * automated/base64-tests.el (bt-base64-decode-string): * automated/base64-tests.el (for): * automated/byte-compiler-tests.el: * automated/byte-compiler-tests.el (before-and-after-compile-equal): * automated/case-tests.el (downcase-string): * automated/case-tests.el (uni-mappings): * automated/ccl-tests.el (ccl-test-normal-expr): * automated/ccl-tests.el (ccl-test-map-instructions): * automated/ccl-tests.el (ccl-test-suites): * automated/database-tests.el (delete-database-files): * automated/extent-tests.el (let): * automated/extent-tests.el (insert): * automated/extent-tests.el (props): * automated/file-tests.el: * automated/file-tests.el (for): * automated/hash-table-tests.el (test): * automated/hash-table-tests.el (for): * automated/hash-table-tests.el (ht): * automated/hash-table-tests.el (iterations): * automated/hash-table-tests.el (h1): * automated/hash-table-tests.el (equal): * automated/hash-table-tests.el (=): * automated/lisp-tests.el: * automated/lisp-tests.el (eq): * automated/lisp-tests.el (test-setq): * automated/lisp-tests.el (my-vector): * automated/lisp-tests.el (x): * automated/lisp-tests.el (equal): * automated/lisp-tests.el (y): * automated/lisp-tests.el (featurep): * automated/lisp-tests.el (=): * automated/lisp-tests.el (six): * automated/lisp-tests.el (three): * automated/lisp-tests.el (one): * automated/lisp-tests.el (two): * automated/lisp-tests.el (five): * automated/lisp-tests.el (test1): * automated/lisp-tests.el (division-test): * automated/lisp-tests.el (for): * automated/lisp-tests.el (check-function-argcounts): * automated/lisp-tests.el (z): * automated/lisp-tests.el (eql): * automated/lisp-tests.el (test-harness-risk-infloops): * automated/lisp-tests.el (erase-buffer): * automated/lisp-tests.el (sym): * automated/lisp-tests.el (new-char): * automated/lisp-tests.el (new-load-file-name): * automated/lisp-tests.el (cl-floor): * automated/lisp-tests.el (foo): * automated/md5-tests.el (lambda): * automated/md5-tests.el (large-string): * automated/md5-tests.el (mapcar): * automated/md5-tests.el (insert): * automated/mule-tests.el: * automated/mule-tests.el (test-chars): * automated/mule-tests.el (existing-file-name): * automated/mule-tests.el (featurep): * automated/query-coding-tests.el (featurep): * automated/regexp-tests.el: * automated/regexp-tests.el (insert): * automated/regexp-tests.el (Assert): * automated/regexp-tests.el (=): * automated/regexp-tests.el (featurep): * automated/regexp-tests.el (text): * automated/regexp-tests.el (text1): * automated/regexp-tests.el ("aáa"): * automated/regexp-tests.el (eql): * automated/search-tests.el (insert): * automated/search-tests.el (featurep): * automated/search-tests.el (let): * automated/search-tests.el (boundp): * automated/symbol-tests.el: * automated/symbol-tests.el (name): * automated/symbol-tests.el (check-weak-list-unique): * automated/symbol-tests.el (string): * automated/symbol-tests.el (list): * automated/symbol-tests.el (foo): * automated/symbol-tests.el (eq): * automated/symbol-tests.el (fresh-keyword-name): * automated/symbol-tests.el (print-gensym): * automated/symbol-tests.el (mysym): * automated/syntax-tests.el (test-forward-word): * automated/syntax-tests.el (test-backward-word): * automated/syntax-tests.el (test-syntax-table): * automated/syntax-tests.el (with-syntax-table): * automated/syntax-tests.el (Skip-Test-Unless): * automated/syntax-tests.el (with): * automated/tag-tests.el (testfile): * automated/weak-tests.el (w): * automated/weak-tests.el (p): * automated/weak-tests.el (a): Undo change of e.g. (Assert (equalp ...)) to (Assert-equalp ...). Get rid of `Assert-equalp' and friends, `Assert-test', and `Assert-test-not'. Instead, make `Assert' smart enough to do the equivalent functionality when an expression like (Assert (equalp ...)) is seen.
author Ben Wing <ben@xemacs.org>
date Fri, 12 Mar 2010 18:27:51 -0600
parents 189fb67ca31a
children 308d34e9f07d
line wrap: on
line diff
--- a/tests/automated/extent-tests.el	Sun Mar 07 06:43:19 2010 -0600
+++ b/tests/automated/extent-tests.el	Fri Mar 12 18:27:51 2010 -0600
@@ -52,12 +52,12 @@
 
     ;; Put it in a buffer.
     (set-extent-endpoints extent 1 1 (current-buffer))
-    (Assert-eq (extent-object extent) (current-buffer))
+    (Assert (eq (extent-object extent) (current-buffer)))
 
     ;; And then into another buffer.
     (with-temp-buffer
       (set-extent-endpoints extent 1 1 (current-buffer))
-      (Assert-eq (extent-object extent) (current-buffer)))
+      (Assert (eq (extent-object extent) (current-buffer))))
 
     ;; Now that the buffer doesn't exist, extent should be detached
     ;; again.
@@ -65,39 +65,39 @@
 
     ;; This line crashes XEmacs 21.2.46 and prior.
     (set-extent-endpoints extent 1 (length string) string)
-    (Assert-eq (extent-object extent) string)
+    (Assert (eq (extent-object extent) string))
     )
 
   (let ((extent (make-extent 1 1)))
     ;; By default, extent should be closed-open
-    (Assert-eq (get extent 'start-closed) t)
-    (Assert-eq (get extent 'start-open) nil)
-    (Assert-eq (get extent 'end-open) t)
-    (Assert-eq (get extent 'end-closed) nil)
+    (Assert (eq (get extent 'start-closed) t))
+    (Assert (eq (get extent 'start-open) nil))
+    (Assert (eq (get extent 'end-open) t))
+    (Assert (eq (get extent 'end-closed) nil))
 
     ;; Make it closed-closed.
     (set-extent-property extent 'end-closed t)
 
-    (Assert-eq (get extent 'start-closed) t)
-    (Assert-eq (get extent 'start-open) nil)
-    (Assert-eq (get extent 'end-open) nil)
-    (Assert-eq (get extent 'end-closed) t)
+    (Assert (eq (get extent 'start-closed) t))
+    (Assert (eq (get extent 'start-open) nil))
+    (Assert (eq (get extent 'end-open) nil))
+    (Assert (eq (get extent 'end-closed) t))
 
     ;; open-closed
     (set-extent-property extent 'start-open t)
 
-    (Assert-eq (get extent 'start-closed) nil)
-    (Assert-eq (get extent 'start-open) t)
-    (Assert-eq (get extent 'end-open) nil)
-    (Assert-eq (get extent 'end-closed) t)
+    (Assert (eq (get extent 'start-closed) nil))
+    (Assert (eq (get extent 'start-open) t))
+    (Assert (eq (get extent 'end-open) nil))
+    (Assert (eq (get extent 'end-closed) t))
 
     ;; open-open
     (set-extent-property extent 'end-open t)
 
-    (Assert-eq (get extent 'start-closed) nil)
-    (Assert-eq (get extent 'start-open) t)
-    (Assert-eq (get extent 'end-open) t)
-    (Assert-eq (get extent 'end-closed) nil))
+    (Assert (eq (get extent 'start-closed) nil))
+    (Assert (eq (get extent 'start-open) t))
+    (Assert (eq (get extent 'end-open) t))
+    (Assert (eq (get extent 'end-closed) nil)))
 
   )
 
@@ -125,25 +125,25 @@
   (let ((e (make-extent 4 7)))
     ;; current state: "###[eee)###"
     ;;                 123 456 789
-    (Assert-equal (et-range e) '(4 7))
+    (Assert (equal (et-range e) '(4 7)))
 
     (et-insert-at "xxx" 4)
 
     ;; current state: "###[xxxeee)###"
     ;;                 123 456789 012
-    (Assert-equal (et-range e) '(4 10))
+    (Assert (equal (et-range e) '(4 10)))
 
     (et-insert-at "yyy" 7)
 
     ;; current state: "###[xxxyyyeee)###"
     ;;                 123 456789012 345
-    (Assert-equal (et-range e) '(4 13))
+    (Assert (equal (et-range e) '(4 13)))
 
     (et-insert-at "zzz" 13)
 
     ;; current state: "###[xxxyyyeee)zzz###"
     ;;                 123 456789012 345678
-    (Assert-equal (et-range e) '(4 13))
+    (Assert (equal (et-range e) '(4 13)))
     ))
 
 ;; closed-closed
@@ -155,25 +155,25 @@
 
     ;; current state: "###[eee]###"
     ;;                 123 456 789
-    (Assert-equal (et-range e) '(4 7))
+    (Assert (equal (et-range e) '(4 7)))
 
     (et-insert-at "xxx" 4)
 
     ;; current state: "###[xxxeee]###"
     ;;                 123 456789 012
-    (Assert-equal (et-range e) '(4 10))
+    (Assert (equal (et-range e) '(4 10)))
 
     (et-insert-at "yyy" 7)
 
     ;; current state: "###[xxxyyyeee]###"
     ;;                 123 456789012 345
-    (Assert-equal (et-range e) '(4 13))
+    (Assert (equal (et-range e) '(4 13)))
 
     (et-insert-at "zzz" 13)
 
     ;; current state: "###[xxxyyyeeezzz]###"
     ;;                 123 456789012345 678
-    (Assert-equal (et-range e) '(4 16))
+    (Assert (equal (et-range e) '(4 16)))
     ))
 
 ;; open-closed
@@ -186,25 +186,25 @@
 
     ;; current state: "###(eee]###"
     ;;                 123 456 789
-    (Assert-equal (et-range e) '(4 7))
+    (Assert (equal (et-range e) '(4 7)))
 
     (et-insert-at "xxx" 4)
 
     ;; current state: "###xxx(eee]###"
     ;;                 123456 789 012
-    (Assert-equal (et-range e) '(7 10))
+    (Assert (equal (et-range e) '(7 10)))
 
     (et-insert-at "yyy" 8)
 
     ;; current state: "###xxx(eyyyee]###"
     ;;                 123456 789012 345
-    (Assert-equal (et-range e) '(7 13))
+    (Assert (equal (et-range e) '(7 13)))
 
     (et-insert-at "zzz" 13)
 
     ;; current state: "###xxx(eyyyeezzz]###"
     ;;                 123456 789012345 678
-    (Assert-equal (et-range e) '(7 16))
+    (Assert (equal (et-range e) '(7 16)))
     ))
 
 ;; open-open
@@ -216,25 +216,25 @@
 
     ;; current state: "###(eee)###"
     ;;                 123 456 789
-    (Assert-equal (et-range e) '(4 7))
+    (Assert (equal (et-range e) '(4 7)))
 
     (et-insert-at "xxx" 4)
 
     ;; current state: "###xxx(eee)###"
     ;;                 123456 789 012
-    (Assert-equal (et-range e) '(7 10))
+    (Assert (equal (et-range e) '(7 10)))
 
     (et-insert-at "yyy" 8)
 
     ;; current state: "###xxx(eyyyee)###"
     ;;                 123456 789012 345
-    (Assert-equal (et-range e) '(7 13))
+    (Assert (equal (et-range e) '(7 13)))
 
     (et-insert-at "zzz" 13)
 
     ;; current state: "###xxx(eyyyee)zzz###"
     ;;                 123456 789012 345678
-    (Assert-equal (et-range e) '(7 13))
+    (Assert (equal (et-range e) '(7 13)))
     ))
 
 
@@ -256,31 +256,31 @@
 
       ;; current state: xx[xxxxxx]xx
       ;;                12 345678 90
-      (Assert-equal (et-range e) '(3 9))
+      (Assert (equal (et-range e) '(3 9)))
 
       (delete-region 1 2)
 
       ;; current state: x[xxxxxx]xx
       ;;                1 234567 89
-      (Assert-equal (et-range e) '(2 8))
+      (Assert (equal (et-range e) '(2 8)))
 
       (delete-region 2 4)
 
       ;; current state: x[xxxx]xx
       ;;                1 2345 67
-      (Assert-equal (et-range e) '(2 6))
+      (Assert (equal (et-range e) '(2 6)))
 
       (delete-region 1 3)
 
       ;; current state: [xxx]xx
       ;;                 123 45
-      (Assert-equal (et-range e) '(1 4))
+      (Assert (equal (et-range e) '(1 4)))
 
       (delete-region 3 5)
 
       ;; current state: [xx]x
       ;;                 12 3
-      (Assert-equal (et-range e) '(1 3))
+      (Assert (equal (et-range e) '(1 3)))
 
       )))
 
@@ -329,7 +329,7 @@
       (delete-region 4 6)
       ;; ###[]###
       (Assert (not (extent-detached-p e)))
-      (Assert-equal (et-range e) '(4 4))
+      (Assert (equal (et-range e) '(4 4)))
       ))
   )
 
@@ -343,7 +343,7 @@
   (insert "######")
   (let ((e (make-extent 4 4)))
     (et-insert-at "foo" 4)
-    (Assert-equal (et-range e) '(4 4))))
+    (Assert (equal (et-range e) '(4 4)))))
 
 ;; open-closed (should move)
 (with-temp-buffer
@@ -352,7 +352,7 @@
     (put e 'start-open t)
     (put e 'end-closed t)
     (et-insert-at "foo" 4)
-    (Assert-equal (et-range e) '(7 7))))
+    (Assert (equal (et-range e) '(7 7)))))
 
 ;; closed-closed (should extend)
 (with-temp-buffer
@@ -360,7 +360,7 @@
   (let ((e (make-extent 4 4)))
     (put e 'end-closed t)
     (et-insert-at "foo" 4)
-    (Assert-equal (et-range e) '(4 7))))
+    (Assert (equal (et-range e) '(4 7)))))
 
 ;; open-open (illegal; forced to behave like closed-open)
 (with-temp-buffer
@@ -368,4 +368,4 @@
   (let ((e (make-extent 4 4)))
     (put e 'start-open t)
     (et-insert-at "foo" 4)
-    (Assert-equal (et-range e) '(4 4))))
+    (Assert (equal (et-range e) '(4 4)))))