mirror of
https://github.com/zaphar/ucg.git
synced 2025-07-22 18:19:54 -04:00
TESTS: operator precedence compiler test.
This commit is contained in:
parent
2df6cece33
commit
cfd5f085cd
@ -80,7 +80,7 @@ fn test_expression_comparisons() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_binary_operator_precedence() {
|
fn test_binary_operator_precedence() {
|
||||||
//assert_build("let result = 2 * 2 + 1;", "result == 6;");
|
assert_build("let result = 2 * 2 + 1;", "result == 5;");
|
||||||
assert_build("let result = 2 + 2 * 1;", "result == 4;");
|
assert_build("let result = 2 + 2 * 3;", "result == 8;");
|
||||||
assert_build("let result = (2 * 2) + 1;", "result == 5;");
|
assert_build("let result = 2 * (2 + 1);", "result == 6;");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user