Browse Source

tests: add failing test_array_as_argument test

github-actions
Garrit Franke 3 years ago
parent
commit
f742b2992e
  1. 3
      TODO
  2. 13
      src/parser/tests.rs

3
TODO

@ -1,5 +1,6 @@
# Bugs
- Nested expressions can have invalid parens. Example: 6 % 3 == 0 should be true; is false
- Nested expressions can have invalid parens. E.g.: 6 % 3 == 0 should be true; is false (See test_complex_nested_expressions)
- Arrays as function arguments don't work (See test_array_as_argument)
# Cleanups
- Improve error reporting (See ./util/string_util::highlight_position_in_file)

13
src/parser/tests.rs

@ -764,3 +764,16 @@ fn test_complex_nested_expressions() {
let tree = parse(tokens, Some(raw.to_string()));
assert!(tree.is_ok());
}
#[test]
#[ignore]
fn test_array_as_argument() {
let raw = "
fn main() {
println([1, 2, 3])
}
";
let tokens = tokenize(raw);
let tree = parse(tokens, Some(raw.to_string()));
assert!(tree.is_ok());
}

Loading…
Cancel
Save