diff options
author | Leah Neukirchen <leah@vuxu.org> | 2023-01-02 18:58:35 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2023-01-02 18:58:35 +0100 |
commit | 909cf1ba9001f52afbbb6f7cfb6c919869c068ac (patch) | |
tree | 3defa90e042a7228c9d96bbc7cd429c4fa23b726 /tests | |
parent | 5d0b418ffe871b9b1ce8fcdf31786ad737401508 (diff) | |
download | mew-909cf1ba9001f52afbbb6f7cfb6c919869c068ac.tar.gz mew-909cf1ba9001f52afbbb6f7cfb6c919869c068ac.tar.xz mew-909cf1ba9001f52afbbb6f7cfb6c919869c068ac.zip |
add inc!, dec!
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test.mew | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test.mew b/tests/test.mew index b7e5da7..44fdb95 100644 --- a/tests/test.mew +++ b/tests/test.mew @@ -97,6 +97,11 @@ (test 3/2 (inc 1/2)) (test-error (inc "foo"))) +(test-group "inc!" + (test 7 (loc (x 5) (inc! x) (inc! x) x)) + (test 6 (loc (x 5) (inc! x))) + (test 7 (loc (x 5) (inc! x 2)))) + (test-group "dec" (test 4 (dec 5)) (test -2 (dec -1)) @@ -104,6 +109,11 @@ (test -1/2 (dec 1/2)) (test-error (dec "foo"))) +(test-group "dec!" + (test 5 (loc (x 7) (dec! x) (dec! x) x)) + (test 5 (loc (x 6) (dec! x))) + (test 5 (loc (x 7) (dec! x 2)))) + (test-group "boolean" (test #f (boolean #f)) (test #t (boolean #t)) |