Skip to content

Releases: thacuber2a03/toast

v0.4.1

22 Sep 02:20
Compare
Choose a tag to compare

Changes

  • Forgot to expose (^Context) assert.sameType 😓
  • Changed (^Context) assert.sameType's message
    (though it wouldn't have really mattered since you weren't able to call the function anyways)
  • Fixed incorrect function depth tally causing location mismatch
    (not sure of this, will totally check again if any issues pop up)

Implementation:

  • added new test for (^Context) assert.sameType

v0.4.0

21 Sep 15:08
Compare
Choose a tag to compare

Major changes

  • (^Context) pass and (^Context) fail now return a boolean to pass to (^Context) endCustom
  • Added new assertion function (^Context) assert.sameType
  • The library now exits with a fatal error if:
    • a custom assertion function does not end all of its branches with T.endCustom
    • a previous assertion function failed and its enclosing function did not return

Minor changes

  • Hid implementation fields funcDepth and customAsserts
  • Rearranged elements around the library into a more pleasing order

v0.3.0

21 Jun 22:00
Compare
Choose a tag to compare

Breaking changes

  • Custom assertions must now start with a call to startCustom, and each return branch must be return T.endCustom(returnVal):
fn assertTypeEqual(T: ^toast::Context, a, b: any): bool {
    T.startCustom()

    if !selftypeeq(a, b) {
        T.fail("expected a and b to have the same type")
        return T.endCustom(false)
    }

    return T.endCustom(true)
}

Major changes

  • Both compact and verbose more print the line and file of the assertion that made the test fail, along with the time it took:
test 'fake file': error code is not std::StdErr.ok (4)
reason: 'couldn't open non-existant file (as it's supposed to do)'
at file /home/thacuber2a03/Documentos/code/umka/toast/test.um
line 18, took 0.077724ms

Minor changes

  • Hopefully a bit less color than before

v0.2.0

21 Jun 20:01
Compare
Choose a tag to compare

Major changes:

  • Added compact output:
    Tests will now tell whether they fail or not using a simple character:

      OOOOXOO <- tests being printed as they happen
    

    At the end, only the tests that have failed will get printed, with their respective reasons.

  • The order of tests is now consistent, in exchange for a slightly more complex declaration

  • Simplified test management: tests now get registered and store their results on a TestInfo struct

  • Removed color parameter from newContext, the old behavior can be recovered by setting printWithColor to true

Others:

  • Context's fields are now documented

v0.1.0

21 Jun 03:14
Compare
Choose a tag to compare

Initial release