From 498040c3d1532bb6de01dbbb55348f631c3745d6 Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Sun, 24 Jul 2022 20:28:56 -0700 Subject: Fix some bugs in the compare library. --- csc/compare-test.csc | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) (limited to 'csc/compare-test.csc') 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 @@ -29,8 +30,9 @@ (test diff-record - (assert-equal - " ( + (assert + (string=? + " ( (!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 '())))) -- cgit v1.3.1