slige/tests/array_literal.slg

12 lines
245 B
Plaintext
Raw Permalink Normal View History

2024-12-31 02:38:38 +00:00
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");
}