ucg/integration_tests/selectors_test.ucg
Jeremy Wall d2f0ea9f24 FEATURE: Better error reporting.
Slight change to how assert works to support this. We no longer automatically add
a semicolon to the expressions we require the user to right them. This updates the
docs to illustrate that and reformats our integration test suite for this and
readability.
2018-11-06 19:40:56 -06:00

33 lines
413 B
Plaintext

let list = [1, 2, 3, 4];
let tuple = {
field1 = list.0,
field2 = list.2,
deeplist = ["foo", "bar"],
};
let testmacro = macro(arg) => {
output = arg,
};
assert |
list.0 == 1;
|;
assert |
list.1 == 2;
|;
assert |
list.3 == 4;
|;
assert |
tuple.field1 == 1;
|;
assert |
tuple.field2 == 3;
|;
assert |
tuple.deeplist.0 == "foo";
|;
assert |
tuple.deeplist.1 == "bar";
|;