diff options
author | Robby Zambito <contact@robbyzambito.me> | 2023-02-20 23:46:18 -0500 |
---|---|---|
committer | Robby Zambito <contact@robbyzambito.me> | 2023-02-20 23:46:18 -0500 |
commit | 25cb16dfe411a9bd9d9d279d2476ec3dfc0a7595 (patch) | |
tree | a55dc5c3217e6a02547a48da1d594ee90898cbef /test/run.scm | |
parent | acd0188ade22290d844c1a8553738060e59dbf6d (diff) |
Reach feature parity with Sagittarius
Diffstat (limited to 'test/run.scm')
-rw-r--r-- | test/run.scm | 12 |
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))))) |