diff options
| author | Rose Hogenson <rhogenson@posteo.net> | 2022-07-24 20:28:56 -0700 |
|---|---|---|
| committer | Rose Hogenson <rhogenson@posteo.net> | 2022-07-24 20:28:56 -0700 |
| commit | 498040c3d1532bb6de01dbbb55348f631c3745d6 (patch) | |
| tree | 32a1b7ed7ec176f8eaa46092d4a8cd74a050375b /csc/compare-test.csc | |
| parent | Start codegen. (diff) | |
| download | chromatopelma-498040c3d1532bb6de01dbbb55348f631c3745d6.tar.zst | |
Fix some bugs in the compare library.
Diffstat (limited to 'csc/compare-test.csc')
| -rw-r--r-- | csc/compare-test.csc | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/csc/compare-test.csc b/csc/compare-test.csc index 8791e1d..379f21b 100644 --- a/csc/compare-test.csc +++ b/csc/compare-test.csc @@ -2,14 +2,15 @@ (only (csc match) define-match-record-type) (only (csc testing) - assert-equal + assert test) (csc compare)) (test diff-list - (assert-equal - " ( + (assert + (string=? + " ( 1 - 2 3 @@ -17,7 +18,7 @@ 4 ) " - (diff '(1 2 3 4) '(1 3 3.5 4)))) + (diff '(1 2 3 4) '(1 3 3.5 4))))) (define-match-record-type <test-type> @@ -29,8 +30,9 @@ (test diff-record - (assert-equal - " ( + (assert + (string=? + " ( (!type . <test-type> ) @@ -43,12 +45,13 @@ ) ) " - (diff (make-test-type 5 5) (make-test-type 5 6) (cons test-type? %test-type)))) + (diff (make-test-type 5 5) (make-test-type 5 6) (cons test-type? %test-type))))) (test diff-multiline-string - (assert-equal - " ( + (assert + (string=? + " ( (!type . string ) @@ -61,12 +64,13 @@ ) ) " - (diff "line-one\nline-two\nline-three" "line-one\nline-three"))) + (diff "line-one\nline-two\nline-three" "line-one\nline-three")))) (test diff-vector - (assert-equal - " ( + (assert + (string=? + " ( (!type . vector ) @@ -79,4 +83,14 @@ ) ) " - (diff #(1 2 3) #(1 3)))) + (diff #(1 2 3) #(1 3))))) + + +(test diff-symbol-list + (assert + (string=? + "- symbol ++ ( ++ ) +" + (diff 'symbol '())))) |
