Skip to content

[BUG] Division by zero in LongDivision #3896

@DavidCed

Description

@DavidCed

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions