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
Description: Trying to parse numeric input when the number has a sign (e.g. -5, +6) leads to ShakespeareRuntimeError
Sample Play:
The Folly Of The Writer, a tragedy in one act.
Romeo, Determined to expose every single mistake.
Juliet, His ever-faithful companion.
Act I: The Error Begins.
Scene I: A Sign Of Disaster.
[Enter Romeo and Juliet]
Romeo: Listen to your heart. Open your heart.
Expected Behaviour:
The program should correctly interpret signed numbers as valid input. When running the sample play with the following inputs, the expected outputs should be:
Input: 23
Output: 23
Input: -6
Output: -6
Input: +9
Output: 9
Actual Behaviour:
The program handles unsigned numbers correctly, but fails when parsing signed numbers, raising a ShakespeareRuntimeError. The following happens:
Input: 23
Output: 23
Input: -6
Error Raised: ShakespeareRuntimeError: No numeric input was given.
Input: +9
Error Raised: ShakespeareRuntimeError: No numeric input was given.
The text was updated successfully, but these errors were encountered:
This is a wonderful bug report! I'm wondering, is this behavior described in the Shakespeare specification, or is this behavior you've seen in other implementations (if so, which ones)?
Description: Trying to parse numeric input when the number has a sign (e.g. -5, +6) leads to ShakespeareRuntimeError
Sample Play:
Expected Behaviour:
The program should correctly interpret signed numbers as valid input. When running the sample play with the following inputs, the expected outputs should be:
Input: 23
Output: 23
Input: -6
Output: -6
Input: +9
Output: 9
Actual Behaviour:
The program handles unsigned numbers correctly, but fails when parsing signed numbers, raising a ShakespeareRuntimeError. The following happens:
Input: 23
Output: 23
Input: -6
Error Raised: ShakespeareRuntimeError: No numeric input was given.
Input: +9
Error Raised: ShakespeareRuntimeError: No numeric input was given.
The text was updated successfully, but these errors were encountered: