impl negation

This commit is contained in:
cozis
2022-03-27 16:33:49 +02:00
parent f096c82188
commit a3174fdcde
2 changed files with 64 additions and 8 deletions
+4 -4
View File
@@ -14,8 +14,8 @@
# Test operations on integers.
{
# assert(4 == +4); -------------------- FAILING
# assert(0-4 == -4); ------------------ FAILING
assert(4 == +4);
assert(0-4 == -4);
assert(1 + 1 == 2);
assert(2 * 3 == 6);
assert(6 / 3 == 2);
@@ -30,8 +30,8 @@
# Test operations on floats.
{
# assert(4.0 == +4.0); # -------------------- FAILING
# assert(0-4.0 == -4.0); # ------------------ FAILING
assert(4.0 == +4.0);
assert(0-4.0 == -4.0);
assert(1.0 + 1.0 == 2.0);
assert(2.0 * 3.0 == 6.0);
assert(6.0 / 3.0 == 2.0);