@@ -18,10 +18,10 @@ void testValidExpressions(String infix, String expectedPrefix) throws Exception
18
18
19
19
private static Stream <Arguments > provideValidExpressions () {
20
20
return Stream .of (
21
- Arguments .of ("3+2" , "+32" ), // Simple addition
22
- Arguments .of ("1+(2+3)" , "+1+23" ), // Parentheses
23
- Arguments .of ("(3+4)*5-6" , "-*+3456" ), // Nested operations
24
- Arguments .of ("a+b*c" , "+a*bc" ) // Multiplication precedence
21
+ Arguments .of ("3+2" , "+32" ), // Simple addition
22
+ Arguments .of ("1+(2+3)" , "+1+23" ), // Parentheses
23
+ Arguments .of ("(3+4)*5-6" , "-*+3456" ), // Nested operations
24
+ Arguments .of ("a+b*c" , "+a*bc" ) // Multiplication precedence
25
25
);
26
26
}
27
27
@@ -34,8 +34,8 @@ void testInvalidExpressions(String infix, String expectedMessage) {
34
34
35
35
private static Stream <Arguments > provideInvalidExpressions () {
36
36
return Stream .of (
37
- Arguments .of ("((a+b)*c-d" , "invalid expression" ), // Missing closing bracket
38
- Arguments .of ("a++b" , "invalid expression" ) // Invalid operator
37
+ Arguments .of ("((a+b)*c-d" , "invalid expression" ), // Missing closing bracket
38
+ Arguments .of ("a++b" , "invalid expression" ) // Invalid operator
39
39
);
40
40
}
41
41
}
0 commit comments