Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test code that never executes #465

Merged
merged 2 commits into from
Apr 19, 2019

Conversation

EriWong
Copy link
Contributor

@EriWong EriWong commented Apr 18, 2019

Test code never executes - ill defined loop

Fixes #175.

Fixes loop in test code to verify that commands not supported by the unit converter viewmodel result in no-op.

Description of the changes:

Replaced loop of range of enums with a list of all currently supported commands in check that those commands are no-ops.

How changes were validated:

Ran modified test to ensure it passes

Test code never executes - ill defined loop
@HowardWolosky HowardWolosky added fixing approved issue codebase quality Issues that are not bugs, but still might be worth improving (eg, code hygiene or maintainability) labels Apr 18, 2019
@HowardWolosky HowardWolosky changed the title Fixes #175 Fix test code that never executes Apr 18, 2019
Copy link
Member

@HowardWolosky HowardWolosky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Eric. I agree with you that we should just remove the loop in this instance.

@HowardWolosky HowardWolosky self-assigned this Apr 18, 2019
Copy link
Member

@HowardWolosky HowardWolosky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@HowardWolosky HowardWolosky merged commit 43b2d4e into microsoft:master Apr 19, 2019
@EriWong EriWong deleted the eriwong/175 branch April 19, 2019 18:05
EriWong added a commit to EriWong/calculator that referenced this pull request Jun 5, 2019
Fixes microsoft#175.
Fixes loop in test code to verify that commands not supported by the unit converter viewmodel result in no-op.

Description of the changes:
Removed loop of range of enums with a being tested for no-ops since it added no intrinsic value (and the way that the range was handled was incorrect).  Considered adding an iterator over a static list of commands to validate against, but determined it didn't add any notable value.

How changes were validated:
Ran modified test to ensure it passes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codebase quality Issues that are not bugs, but still might be worth improving (eg, code hygiene or maintainability) fixing approved issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test code never executes - ill defined loop
2 participants