summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/run.scm12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/run.scm b/test/run.scm
index f3d63dc..6d72f46 100644
--- a/test/run.scm
+++ b/test/run.scm
@@ -63,16 +63,16 @@
(json-null? (string->json "null")))
(test-equal "numbers should parse to their scheme values"
- 5 (string->json "5"))
+ 5 (string->json "5"))
(test-equal "true should parse to the boolean true"
- #t (string->json "true"))
+ #t (string->json "true"))
(test-equal "false should parse to the boolean false"
- #f (string->json "false"))
+ #f (string->json "false"))
(test-equal "string->json should properly parse string values"
- "hello" (string->json "\"hello\""))
+ "hello" (string->json "\"hello\""))
(test-assert "string->json should return an object with the correct keys"
(json-object-contains-key? (string->json "{\"x\": 5}") 'x))
@@ -250,3 +250,7 @@
(and (three-d-point? tdp2)
(not (point? tdp2)))))
+(test-assert "the string to record converter should raise an exception if there are missing keys"
+ (guard (_ (else #t))
+ (string->point "{\"x\": 5}")
+ #f))