mirror of
https://github.com/zaphar/ucg.git
synced 2025-07-22 18:19:54 -04:00
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.
33 lines
413 B
Plaintext
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";
|
|
|; |