mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
15 lines
438 B
Plaintext
15 lines
438 B
Plaintext
//test operators (integers)
|
|
assert 1 + 1 == 2, "1 + 1 == 2";
|
|
assert 1 - 1 == 0, "1 - 1 == 0";
|
|
assert 2 * 2 == 4, "2 * 2 == 4";
|
|
assert 1 / 2 == 0, "1 / 2 == 0"; //integer division
|
|
assert 5 % 2 == 1, "5 % 2 == 1";
|
|
|
|
//test operators (floats)
|
|
assert 1.0 + 1.0 == 2.0, "1.0 + 1.0 == 2.0";
|
|
assert 1.0 - 1.0 == 0.0, "1.0 - 1.0 == 0.0";
|
|
assert 2.0 * 2.0 == 4.0, "2.0 * 2.0 == 4.0";
|
|
assert 1.0 / 2.0 == 0.5, "1.0 / 2.0 == 0.5";
|
|
|
|
|
|
print "All good"; |