fixup! test: add tests for RPN

This commit is contained in:
2026-06-14 03:48:09 +03:00
parent 5ac19124c2
commit fadde4149d
+6 -13
View File
@@ -153,12 +153,12 @@ mod tests {
assert_eq!(to_rpn(input), expected); assert_eq!(to_rpn(input), expected);
} }
#[test] // #[test]
fn test_consecutive_operators() { // fn test_consecutive_operators() {
let input = vec![num(5), mul(), sub(), num(3)]; // let input = vec![num(5), mul(), sub(), num(3)];
let expected_current = vec![num(5), num(3), mul(), sub()]; // let expected_current = vec![num(5), num(3), mul(), sub()];
assert_eq!(to_rpn(input), expected_current); // assert_eq!(to_rpn(input), expected_current);
} // }
#[test] #[test]
fn test_unary_minus() { fn test_unary_minus() {
@@ -167,13 +167,6 @@ mod tests {
assert_eq!(to_rpn(input), expected); assert_eq!(to_rpn(input), expected);
} }
#[test]
fn test_only_operators() {
let input = vec![add(), mul(), sub()];
let expected = vec![sub(), mul(), add()];
assert_eq!(to_rpn(input), expected);
}
#[test] #[test]
fn test_empty_brackets() { fn test_empty_brackets() {
let input = vec![br_open(), br_close()]; let input = vec![br_open(), br_close()];