Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Positive test cases (test rational resistances)

  1. Expect calculate_current(0.0, 1.0) == 0.0

  2. Expect calculate_current(0.0, FLOAT_MAX) == 0.0

Negative test cases (test irrational resistances)

  1. Expect calculate_current(0.0, 0.0) == 0.0 (No runtime divide by 0 exception should occur)

  2. Expect calculate_current(0.0, -1.0) == 0.0 (No runtime divide by 0 exception should occur)

...