Skip to content

Commit eaf7a6d

Browse files
committed
add set-box! tests
1 parent a713172 commit eaf7a6d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

typed-racket-test/unit-tests/typecheck-tests.rkt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1337,6 +1337,11 @@
13371337
(-box -Nat -Int)]
13381338
[tc-e (unbox (if (zero? (random 2)) ((inst box Natural) 3) ((inst box Integer) -5)))
13391339
-Int]
1340+
[tc-e (set-box!
1341+
(if (zero? (random 2)) ((inst box Natural) 3) ((inst box Integer) -5))
1342+
1)
1343+
-Void]
1344+
[tc-err (set-box! (if (zero? (random 2)) ((inst box Natural) 3) ((inst box Integer) -5)) -1)]
13401345
[tc-e (floor 1/2) -Nat]
13411346
[tc-e (ceiling 1/2) -PosInt]
13421347
[tc-e (truncate 0.5) -NonNegFlonum]

0 commit comments

Comments
 (0)