diff options
Diffstat (limited to 'csc/compare-test.csc')
| -rw-r--r-- | csc/compare-test.csc | 76 |
1 files changed, 39 insertions, 37 deletions
diff --git a/csc/compare-test.csc b/csc/compare-test.csc index 379f21b..b710115 100644 --- a/csc/compare-test.csc +++ b/csc/compare-test.csc @@ -1,16 +1,18 @@ -(import (scheme base) - (only (csc match) - define-match-record-type) - (only (csc testing) - assert - test) - (csc compare)) +(define-library (csc compare-test) + (import (scheme base) + (only (csc match) + define-match-record-type) + (only (csc testing) + assert + test) + (csc compare)) + (begin -(test diff-list - (assert - (string=? - " ( + (test diff-list + (assert + (string=? + " ( 1 - 2 3 @@ -18,21 +20,21 @@ 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> - (make-test-type a b) - test-type? - %test-type - (a test-type-a) - (b test-type-b)) + (define-match-record-type <test-type> + (make-test-type a b) + test-type? + %test-type + (a test-type-a) + (b test-type-b)) -(test diff-record - (assert - (string=? - " ( + (test diff-record + (assert + (string=? + " ( (!type . <test-type> ) @@ -45,13 +47,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 - (string=? - " ( + (test diff-multiline-string + (assert + (string=? + " ( (!type . string ) @@ -64,12 +66,12 @@ ) ) " - (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 - (string=? + (test diff-vector + (assert + (string=? " ( (!type . vector @@ -83,14 +85,14 @@ ) ) " - (diff #(1 2 3) #(1 3))))) + (diff #(1 2 3) #(1 3))))) -(test diff-symbol-list - (assert - (string=? - "- symbol + (test diff-symbol-list + (assert + (string=? + "- symbol + ( + ) " - (diff 'symbol '())))) + (diff 'symbol '())))))) |
