From 0511cefaf028c811c719a3f26b2513d2f2fbd72d Mon Sep 17 00:00:00 2001 From: Hongjie Zhai Date: Sat, 18 Jul 2015 22:46:25 +0900 Subject: [PATCH] aad test --- .../literals/array-literal-in-class.ooc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/compiler/literals/array-literal-in-class.ooc diff --git a/test/compiler/literals/array-literal-in-class.ooc b/test/compiler/literals/array-literal-in-class.ooc new file mode 100644 index 00000000..28b4e40c --- /dev/null +++ b/test/compiler/literals/array-literal-in-class.ooc @@ -0,0 +1,19 @@ +Foo: class{ + test := [1, 2, 3] + init: func +} + +Bar: class{ + test := static const [1, 2, 3] + init: func +} + +describe("ArrayLiteral should be correctly unwrapped",|| + foo := Foo new() + assert(foo test[0] == 1) + assert(foo test[1] == 2) + assert(foo test[2] == 3) + assert(Bar test[0] == 1) + assert(Bar test[1] == 2) + assert(Bar test[2] == 3) +)