ChaiScript/unittests/3.x/index_operator.chai
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

11 lines
186 B
ChaiScript

// tests more complex parses of the index operator
def Bob::bob3() { return [1,2,3]; }
def Bob::Bob() {}
var b = Bob();
assert_equal(b.bob3()[0], 1);
assert_equal((b.bob3())[1], 2);