dylan-lang / testworks

Test framework for Dylan
http://dylan-lang.github.io/testworks/
5 stars 5 forks source link

When assertion crashes, display description #145

Open cgay opened 3 years ago

cgay commented 3 years ago
Running test test-<parameter-option>: CRASHED in 0.000637s and 56KiB
    Unexpected token: "="

test-<parameter-option> crashed [Unexpected token: "="]

The assertion that caused that crash has a description, and it should be displayed in the result:

  for (argv in list(vector("--airport", "BOS"),
                    vector("--airport=BOS"),
                    vector("--airport", "=", "BOS"),
                    vector("-aBOS"),
                    vector("-a=BOS"),
                    vector("-as", "=", "BOS")))
    let parser = parse(argv);
    assert-equal("BOS", get-option-value(parser, "airport"),
                 format-to-string("argv = %=", argv));
    ...
cgay commented 3 years ago

For the record, the failing case was the last one: "-as" was a typo for "-a"