diff --git a/unittests/mmd1.chai b/unittests/mmd1.chai new file mode 100644 index 0000000..4368557 --- /dev/null +++ b/unittests/mmd1.chai @@ -0,0 +1,20 @@ +def bob(x, y, z) { + x + y + z +} + +def bob(x, y) { + x - y +} + +def bob(x) { + -x +} + +def bob() { + 10 +} + +print(bob()) +print(bob(5)) +print(bob(5,6)) +print(bob(5,6,7)) diff --git a/unittests/mmd1.txt b/unittests/mmd1.txt new file mode 100644 index 0000000..0da6de7 --- /dev/null +++ b/unittests/mmd1.txt @@ -0,0 +1,4 @@ +10 +-5 +-1 +18 diff --git a/unittests/mmd2.chai b/unittests/mmd2.chai new file mode 100644 index 0000000..2247a38 --- /dev/null +++ b/unittests/mmd2.chai @@ -0,0 +1,9 @@ +def bob(x, y) : x > 10 { x - y } + +def bob(x, y) : x > 5 { x - y + 10 } + +def bob(x, y) { x + y } + +print(bob(3, 4)) +print(bob(6, 7)) +print(bob(11, 12)) diff --git a/unittests/mmd2.txt b/unittests/mmd2.txt new file mode 100644 index 0000000..eb2ae03 --- /dev/null +++ b/unittests/mmd2.txt @@ -0,0 +1,3 @@ +7 +9 +-1