Add unit tests for mmd and guarded mmd
This commit is contained in:
parent
57aeacab2e
commit
fb286b91ea
20
unittests/mmd1.chai
Normal file
20
unittests/mmd1.chai
Normal file
@ -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))
|
4
unittests/mmd1.txt
Normal file
4
unittests/mmd1.txt
Normal file
@ -0,0 +1,4 @@
|
||||
10
|
||||
-5
|
||||
-1
|
||||
18
|
9
unittests/mmd2.chai
Normal file
9
unittests/mmd2.chai
Normal file
@ -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))
|
3
unittests/mmd2.txt
Normal file
3
unittests/mmd2.txt
Normal file
@ -0,0 +1,3 @@
|
||||
7
|
||||
9
|
||||
-1
|
Loading…
x
Reference in New Issue
Block a user