summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrefetch2024-03-26 21:42:40 +0100
committerPrefetch2024-03-26 21:42:40 +0100
commitb8483843d65ee734882c4477de994c1931be17ad (patch)
treeb16f49866a19c4cc24b68b59dc1b4bf59c252b9d
parent757b98fb30e75d7698a0986184d0303224db156c (diff)
For testing days 1-5, use "equal?" instead of "="HEADmaster
-rw-r--r--01/test.scm2
-rw-r--r--02/test.scm2
-rw-r--r--03/test.scm2
-rw-r--r--04/test.scm2
-rw-r--r--05/test.scm2
5 files changed, 5 insertions, 5 deletions
diff --git a/01/test.scm b/01/test.scm
index 6dbff81..14e13ff 100644
--- a/01/test.scm
+++ b/01/test.scm
@@ -6,7 +6,7 @@
; My quick-and-dirty unit testing framework (copied for each day)
(define (run-test name proc input expected)
(let ((result (proc input)))
- (if (= result expected)
+ (if (equal? result expected)
(printf "\x1b;[32;1mPASS\x1b;[0m: ~a\n"
name)
(printf "\x1b;[31;1mFAIL\x1b;[0m: ~a: got ~a, expected ~a\n"
diff --git a/02/test.scm b/02/test.scm
index 10ee751..7754a48 100644
--- a/02/test.scm
+++ b/02/test.scm
@@ -6,7 +6,7 @@
; My quick-and-dirty unit testing framework (copied for each day)
(define (run-test name proc input expected)
(let ((result (proc input)))
- (if (= result expected)
+ (if (equal? result expected)
(printf "\x1b;[32;1mPASS\x1b;[0m: ~a\n"
name)
(printf "\x1b;[31;1mFAIL\x1b;[0m: ~a: got ~a, expected ~a\n"
diff --git a/03/test.scm b/03/test.scm
index 0f7817c..51ef514 100644
--- a/03/test.scm
+++ b/03/test.scm
@@ -6,7 +6,7 @@
; My quick-and-dirty unit testing framework (copied for each day)
(define (run-test name proc input expected)
(let ((result (proc input)))
- (if (= result expected)
+ (if (equal? result expected)
(printf "\x1b;[32;1mPASS\x1b;[0m: ~a\n"
name)
(printf "\x1b;[31;1mFAIL\x1b;[0m: ~a: got ~a, expected ~a\n"
diff --git a/04/test.scm b/04/test.scm
index 564016a..d0c3291 100644
--- a/04/test.scm
+++ b/04/test.scm
@@ -6,7 +6,7 @@
; My quick-and-dirty unit testing framework (copied for each day)
(define (run-test name proc input expected)
(let ((result (proc input)))
- (if (= result expected)
+ (if (equal? result expected)
(printf "\x1b;[32;1mPASS\x1b;[0m: ~a\n"
name)
(printf "\x1b;[31;1mFAIL\x1b;[0m: ~a: got ~a, expected ~a\n"
diff --git a/05/test.scm b/05/test.scm
index 36e52ed..b2eafab 100644
--- a/05/test.scm
+++ b/05/test.scm
@@ -6,7 +6,7 @@
; My quick-and-dirty unit testing framework (copied for each day)
(define (run-test name proc input expected)
(let ((result (proc input)))
- (if (= result expected)
+ (if (equal? result expected)
(printf "\x1b;[32;1mPASS\x1b;[0m: ~a\n"
name)
(printf "\x1b;[31;1mFAIL\x1b;[0m: ~a: got ~a, expected ~a\n"