Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
probablykasper committed Oct 26, 2024
1 parent 1388182 commit 78495d4
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions core/tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,15 @@ fn order_of_operations_17() {
test_eval("-3 -1/2", "-3.5");
}

#[test]
fn order_of_operations_18() {
test_eval("1/2/4", "0.125");
}
#[test]
fn order_of_operations_19() {
test_eval("19 % 7 % 3", "2");
}

#[test]
fn yobibyte() {
test_eval("1 YiB to bytes", "1208925819614629174706176 bytes");
Expand Down Expand Up @@ -6078,3 +6087,33 @@ fn european_formatting() {
"approx. 0,9320390859"
);
}

#[test]
fn implitic_mul_priority_1() {
test_eval("10m/2s", "2 m / s");
}

#[test]
fn implitic_mul_priority_2() {
test_eval("10m/2s * 5 s", "25 m");
}

#[test]
fn implitic_mul_priority_3() {
test_eval("sin pi/2", "0")
}

#[test]
fn implitic_mul_priority_4() {
test_eval("1 3/8 inches", "1.375 inches")
}

#[test]
fn implitic_mul_priority_5() {
test_eval("-sin (pi/2)", "-1")
}

#[test]
fn implitic_mul_priority_6() {
test_eval("-sin (pi/2)", "-1")
}

0 comments on commit 78495d4

Please sign in to comment.