Visitar URL original
[BUG] Division by zero in LongDivision · Issue #3896 · TheAlgorithms/Java · GitHub
The Wayback Machine - https://web.archive.org/web/20230315100419/https://github.com/TheAlgorithms/Java/issues/3896
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

[BUG] Division by zero in LongDivision #3896

Open
DavidCed opened this issue Feb 21, 2023 · 0 comments
Open

[BUG] Division by zero in LongDivision #3896

DavidCed opened this issue Feb 21, 2023 · 0 comments
Labels

Comments

@DavidCed
Copy link

DavidCed commented Feb 21, 2023 •

Description

A test case was written to test the edge case of when the divisor is 0, but the program got stuck in a loop.

Issue details

An if-statement checking whether it is a division by zero was added to the divide function and a corresponding test was created in the test class for LongDivision.

Steps to reproduce

No response

Excepted behavior

When the divide function was run with a division by zero, the program got stuck in a loop. Expected to return a 0 or division by zero exception.

Screenshots

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant