slige/tests/array_literal.slg
2025-01-17 11:50:14 +01:00

12 lines
245 B
Plaintext

mod std;
fn main() {
let ints = [1, 2, 3];
std::assert(ints[1] == 2, "test int array");
let strings = ["foo", "bar", "baz"];
std::assert(strings[1] == "bar", "test string array");
std::println("tests ran successfully");
}