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

Division and multiplication evaluating to 0.0 in unit tests #1

Closed
mbartelsm opened this issue Oct 16, 2019 · 1 comment
Closed

Division and multiplication evaluating to 0.0 in unit tests #1

mbartelsm opened this issue Oct 16, 2019 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@mbartelsm
Copy link
Contributor

In unit tests for eval_postfix, division and multiplication always evaluate to 0.0, even division by 0.
However, when running from main with the entire pipeline, it works as expected.

Ideas:

  • Review unit tests
  • Implement tests for other functions
  • Compare, perhaps test implementation is wrong-
@mbartelsm mbartelsm self-assigned this Oct 16, 2019
@mbartelsm mbartelsm added the bug Something isn't working label Oct 16, 2019
@mbartelsm mbartelsm changed the title Division and multiplication evaluating to 0.0 for all cases Division and multiplication evaluating to 0.0 in unit tests Oct 16, 2019
@mbartelsm
Copy link
Contributor Author

Two changes were necessary:

  1. Unit tests had a typo
  2. Implementation of eval_postfix had an error that caused it to restore consumed items from the expression stack.

This issue is now fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant