From afae221cb34ed19b29a7cfcd82afdbf1d344ead5 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Fri, 10 Jun 2011 11:18:58 -0600 Subject: [PATCH] Add tests for more complex uses of the index operator --- unittests/index_operator.chai | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 unittests/index_operator.chai diff --git a/unittests/index_operator.chai b/unittests/index_operator.chai new file mode 100644 index 0000000..7ff4670 --- /dev/null +++ b/unittests/index_operator.chai @@ -0,0 +1,10 @@ + +// 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);