SECTION 40 / 48

A Unit Test Catches a Bug

1 min read

Forgetting the + replaces the count instead of adding to it. The second addition produces 10 instead of 20, causing AssertionError: 10 != 20. Fix the addition and all tests pass.

A Unit Test Catches a Bug
A Unit Test Catches a Bug
Open image ↗
A Unit Test Catches a Bug
YOUR STUDY PROGRESS

Finished this section? Save your progress.

Back to top ↑