Skip to content
Snippets Groups Projects
Commit 95665eff authored by Alexandre Gravereaux's avatar Alexandre Gravereaux
Browse files

fix-test-2

parent c32bec7b
Branches tp2
No related tags found
No related merge requests found
Pipeline #53933 passed
......@@ -54,7 +54,7 @@ class Calculator:
#####################################################################
### ATTENTION: Est-ce que c'est vraiment un < ? (non c'est un <=) ###
#####################################################################
if operator is None or token.precedence < operator.precedence:
if operator is None or token.precedence <= operator.precedence:
operator = token
operator_index = i
......
......@@ -50,3 +50,4 @@ def test_evaluation(setup):
assert calc("2 * 3") == 6
assert calc("2 - 3") == -1
assert calc("6 / 3") == 2
assert calc("6 / 3 * 2") == 4
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment