Update of /project/mcclim/cvsroot/mcclim/Drei/Tests In directory clnet:/tmp/cvs-serv16402/Drei/Tests
Modified Files: buffer-tests.lisp Log Message: Changed DELETE-BUFFER-REGION to use DELETE-ELEMENTS*.
Requires Flexichain 1.3 (currently, this means CVS).
Increases region-killing performance by more than a hundredfold for most cases.
--- /project/mcclim/cvsroot/mcclim/Drei/Tests/buffer-tests.lisp 2007/12/08 08:53:49 1.3 +++ /project/mcclim/cvsroot/mcclim/Drei/Tests/buffer-tests.lisp 2008/01/26 00:23:37 1.4 @@ -231,40 +231,40 @@ (let ((m (make-buffer-mark buffer 3 :left)) (m2 (make-buffer-mark buffer 5 :left))) (delete-region m m2) - (is (= (size buffer) 5)) + (is (= 5 (size buffer))) (is (eq (buffer m) (buffer m2))) - (is (= (offset m) 3)) - (is (= (offset m2) 3)) + (is (= 3 (offset m))) + (is (= 3 (offset m2))) (is (string= (buffer-substring buffer 0 5) "clics")))) (let ((buffer (make-instance %%buffer))) (insert-buffer-sequence buffer 0 "climacs") (let ((m (make-buffer-mark buffer 3 :right)) (m2 (make-buffer-mark buffer 5 :right))) (delete-region m m2) - (is (= (size buffer) 5)) + (is (= 5 (size buffer))) (is (eq (buffer m) (buffer m2))) - (is (= (offset m) 3)) - (is (= (offset m2) 3)) + (is (= 3 (offset m))) + (is (= 3 (offset m2))) (is (string= (buffer-substring buffer 0 5) "clics")))) (let ((buffer (make-instance %%buffer))) (insert-buffer-sequence buffer 0 "climacs") (let ((m (make-buffer-mark buffer 3 :left)) (m2 (make-buffer-mark buffer 5 :left))) (delete-region m2 m) - (is (= (size buffer) 5)) + (is (= 5 (size buffer))) (is (eq (buffer m) (buffer m2))) - (is (= (offset m) 3)) - (is (= (offset m2) 3)) + (is (= 3 (offset m))) + (is (= 3 (offset m2))) (is (string= (buffer-substring buffer 0 5) "clics")))) (let ((buffer (make-instance %%buffer))) (insert-buffer-sequence buffer 0 "climacs") (let ((m (make-buffer-mark buffer 3 :right)) (m2 (make-buffer-mark buffer 5 :right))) (delete-region m2 m) - (is (= (size buffer) 5)) + (is (= 5 (size buffer))) (is (eq (buffer m) (buffer m2))) - (is (= (offset m) 3)) - (is (= (offset m2) 3)) + (is (= 3 (offset m))) + (is (= 3 (offset m2))) (is (string= (buffer-substring buffer 0 5) "clics")))) (signals error (let ((buffer (make-instance %%buffer)) @@ -280,11 +280,11 @@ (m2 (make-buffer-mark buffer 5 :left))) (delete-region m 5) (delete-region 1 m2) - (is (= (size buffer) 3)) + (is (= 3 (size buffer))) (is (eq (buffer m) (buffer m2))) - (is (= (offset m) 1)) - (is (= (offset m2) 1)) - (is (string= (buffer-substring buffer 0 3) "ccs"))))) + (is (= 1 (offset m))) + (is (= 1 (offset m2))) + (is (string= "ccs" (buffer-substring buffer 0 3))))))
(buffer-test number-of-lines (let ((buffer (make-instance %%buffer)))