Jonathan Turner c73f16fdfe Fixing 4.x grammar to be backward compatible.
Added 3.x unit tests back to show this.
2012-05-17 10:14:50 -07:00

21 lines
203 B
ChaiScript

def bob(x, y, z) {
x + y + z
}
def bob(x, y) {
x - y
}
def bob(x) {
-x
}
def bob() {
10
}
assert_equal(10, bob())
assert_equal(-5, bob(5))
assert_equal(-1, bob(5,6))
assert_equal(18, bob(5,6,7))