A black-box test: the output is the assertion

The complete source of forAI_format_test.ek9, compiled by the EK9 compiler. Shown on forAI.html.

#!ek9
defines module site.forAI.shop.formattests

  references
    site.forAI.shop::Formatter

  defines program

    @Test
    testFormatOutput()
      stdout <- Stdout()
      formatter <- Formatter()
      result <- formatter.format("hello")
      stdout.println(result)

Download forAI_format_test.ek9

Output

testFormatOutput

HELLO