Browse Source

tests: add ignored test_complex_nested_expressions

github-actions
Garrit Franke 3 years ago
parent
commit
d8a36ffbe6
  1. 2
      examples/playground.sb
  2. 19
      src/parser/tests.rs

2
examples/playground.sb

@ -1,5 +1,5 @@
fn main() {
let x = (1 + (2 * 3))
print(x)
println(x)
}

19
src/parser/tests.rs

@ -745,3 +745,22 @@ fn test_break() {
let tree = parse(tokens, Some(raw.to_string()));
assert!(tree.is_ok());
}
#[test]
#[ignore]
fn test_complex_nested_expressions() {
let raw = "
fn main() {
let year = 2020
if (year % 4 == 0) && (year % 100 != 0) || (year % 400 == 0) {
println('Leap year')
} else {
println('Not a leap year')
}
}
";
let tokens = tokenize(raw);
let tree = parse(tokens, Some(raw.to_string()));
assert!(tree.is_ok());
}

Loading…
Cancel
Save