You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the spec, "What is 52 cubed?" should raise an unknown operation error. "cubed" is an unknown operation so that seems reasonable. However, all the other operations in the exercise are binary operations and "cubed" is unary. So "52 cubed" is also a syntax error in the context of parsing binary operations. (One of the other tests is "What is 1 plus?" which is exactly the same form as "What is 52 cubed?" but here we throw a syntax error).
Thus it seems failing a test for catching the syntax error before the unknown operation error doesn't seem correct. Perhaps both kinds of errors should be permitted?
Suggestions: add a test to catch an unknown binary operation eg. "What is 4 quus 5?", and let "What is 52 cubed?" pass the test if either error message is raised.
The text was updated successfully, but these errors were encountered:
According to the spec, "What is 52 cubed?" should raise an unknown operation error. "cubed" is an unknown operation so that seems reasonable. However, all the other operations in the exercise are binary operations and "cubed" is unary. So "52 cubed" is also a syntax error in the context of parsing binary operations. (One of the other tests is "What is 1 plus?" which is exactly the same form as "What is 52 cubed?" but here we throw a syntax error).
Thus it seems failing a test for catching the syntax error before the unknown operation error doesn't seem correct. Perhaps both kinds of errors should be permitted?
Suggestions: add a test to catch an unknown binary operation eg. "What is 4 quus 5?", and let "What is 52 cubed?" pass the test if either error message is raised.
The text was updated successfully, but these errors were encountered: