cheeseong2001 / pe

0 stars 0 forks source link

`gen` feature allows 0 for `MAXIMUM_DIGITS` #7

Open cheeseong2001 opened 4 months ago

cheeseong2001 commented 4 months ago

image.png

When given 0 for MAXIMUM_DIGITS field, it generates all zeroes. This behaviour shouldn't exist as there should be no numbers with 0 maximum digits.

Perhaps there should be checks to verify if it is 0?

nus-se-script commented 4 months ago

Team's Response

It's true that when I wrote the boundary condition check, I only thought about excluding those cases that would crash the system, and didn't consider the case where the operand was all 0, thanks for mentioning it :D

The 'Original' Bug

[The team marked this bug as a duplicate of the following bug]

0 is an accepted argument for -n and -d

If 0 is provided as an argument to -n, no problems are generated.

image.png

If 0 is provided as an argument to -d, then all the operands in the problems are 0. This is not very meaningful.

image.png

Input validation for these arguments do not match the UG/help commands.


[original: nus-cs2113-AY2324S2/pe-interim#2110] [original labels: type.FunctionalityBug severity.VeryLow]

Their Response to the 'Original' Bug

[This is the team's response to the above 'original' bug]

No details provided by team.

Items for the Tester to Verify

:question: Issue duplicate status

Team chose to mark this issue as a duplicate of another issue (as explained in the Team's response above)

Reason for disagreement: [replace this with your explanation]