ucg/integration_tests/tuple_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

40 lines
524 B
Plaintext

let simpletpl = {
foo = "bar"
};
let stringfieldtpl = {
"field 1" = 1,
};
let nestedtpl = {
inner = {
field = "value",
},
scalar = 1,
list = [1, 2, 3, 4],
};
assert |
simpletpl.foo == "bar";
|;
assert |
stringfieldtpl."field 1" == 1;
|;
assert |
nestedtpl.scalar == 1;
|;
assert |
nestedtpl.inner.field == "value";
|;
assert |
nestedtpl.list.0 == 1;
|;
assert |
nestedtpl.list.1 == 2;
|;
assert |
nestedtpl.list.2 == 3;
|;
assert |
nestedtpl.list.3 == 4;
|;