summaryrefslogtreecommitdiff
path: root/test/run.scm
diff options
context:
space:
mode:
Diffstat (limited to 'test/run.scm')
-rw-r--r--test/run.scm12
1 files changed, 5 insertions, 7 deletions
diff --git a/test/run.scm b/test/run.scm
index 416c0f4..d0b0e27 100644
--- a/test/run.scm
+++ b/test/run.scm
@@ -120,7 +120,7 @@
(test-equal "should be able to mutate the value of a field using json-object-set!"
1
(let ((p (json-object '(x . 5))))
- (json-object-set! p 'x 1)
+ (set! p (json-object-set! p 'x 1))
(json-ref p 'x)))
;; json macro tests
@@ -174,7 +174,7 @@
(test-assert "should be able to mutate mutable record fields using json-object-set!"
(guard (_ (else #f))
(let ((p (point 1 2)))
- (json-object-set! p 'y #t)
+ (set! p (json-object-set! p 'y #t))
(point->y p))))
(test-assert "should not be able to mutate immutable record fields using json-object-set!"
@@ -217,11 +217,9 @@
(point? (line-segment->start ls))))
(test-assert "nested records should be able to round trip to a string"
- (let* ((p1 (point 1 2))
- (p2 (point 3 4))
- (ls (line-segment p1 p2))
- (str (json->string ls))
- (res (string->line-segment str)))
+ (let* ((ls (line-segment (point 1 2) (point 3 4)))
+ (str (json->string ls))
+ (res (string->line-segment str)))
(and (line-segment? res)
(point? (line-segment->start res)))))