2019-01-08 19:27:34 -06:00
|
|
|
let empty_list = [];
|
|
|
|
|
|
|
|
let concatenated = ["foo"] + ["bar"];
|
|
|
|
|
2019-01-08 20:32:16 -06:00
|
|
|
assert {
|
|
|
|
ok = concatenated == ["foo", "bar"],
|
2019-01-10 18:38:14 -06:00
|
|
|
desc = "Successfully concatenated",
|
2019-01-08 20:32:16 -06:00
|
|
|
};
|
2019-01-08 19:27:34 -06:00
|
|
|
|
2019-01-08 20:32:16 -06:00
|
|
|
assert {
|
|
|
|
ok = concatenated + empty_list == ["foo", "bar"],
|
2019-01-10 18:38:14 -06:00
|
|
|
desc = "successfully concatenated empty list",
|
|
|
|
};
|
|
|
|
|
|
|
|
assert {
|
|
|
|
ok = 1:5 == [1, 2, 3, 4, 5],
|
|
|
|
desc = "expected list of 5 but got @" % (1:5),
|
|
|
|
};
|
|
|
|
|
|
|
|
assert {
|
|
|
|
ok = 0:2:6 == [0, 2, 4, 6],
|
|
|
|
desc = "Expected evens up to 6 but got @" % (0:2:6),
|
|
|
|
};
|
|
|
|
|
|
|
|
assert {
|
|
|
|
ok = 0:(1+3) == [0, 1, 2, 3, 4],
|
|
|
|
desc = "Expected 0 through 4 but got @" % (0:(1+3)),
|
2019-01-08 20:32:16 -06:00
|
|
|
};
|