dust/tests/table.ds

30 lines
428 B
Plaintext
Raw Normal View History

table = create_table(
2023-08-22 15:40:50 +00:00
("text", "number", "bool"),
(
("a", 1, true),
("b", 2, true),
("a", 3, true)
)
);
test_table = create_table(
2023-08-22 15:40:50 +00:00
("text", "bool"),
(
("a", true),
("b", true),
("a", true)
)
);
assert_equal(select(table, "text", "bool"), test_table);
2023-08-22 15:40:50 +00:00
test_table = create_table(
2023-08-22 15:40:50 +00:00
("text", "number", "bool"),
(
("a", 1, true),
("a", 3, true)
)
);
assert_equal(where(table, 'text == "a"'), test_table);