(t *testing.T)
| 6 | ) |
| 7 | |
| 8 | func TestArithmeticOperators(t *testing.T) { |
| 9 | i := ArithmeticOperators("1.1+2+3+4\n") |
| 10 | assert.Equal(t, i, 10.1) |
| 11 | operators := ArithmeticOperators("1+2+3+4\n") |
| 12 | assert.Equal(t, operators, 10) |
| 13 | |
| 14 | assert.Equal(t, ArithmeticOperators("1+2+4*2\n"), 11) |
| 15 | |
| 16 | assert.Equal(t, ArithmeticOperators("1+(2+4)*2\n"), 13) |
| 17 | assert.Equal(t, ArithmeticOperators("1+(2+4)*1.5\n"), 10.0) |
| 18 | assert.Equal(t, ArithmeticOperators("(1+(2+4)*1.5)/10\n"), 1.0) |
| 19 | |
| 20 | } |
nothing calls this directly
no test coverage detected