The same division, under tests that are wrong

The complete source of testing_assertionsfail.ek9, compiled by the EK9 compiler. Shown on testing.html.

#!ek9
defines module site.testing.assertionsfail

  defines function

    checkedDivide() as pure
      ->
        dividend as Integer
        divisor as Integer
      <- quotient as Integer?

      if divisor == 0
        throw Exception("division by zero")
      quotient: dividend / divisor

Download testing_assertionsfail.ek9