Releases: thacuber2a03/toast
Releases · thacuber2a03/toast
v0.4.1
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
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
- a custom assertion function does not end all of its branches with
Minor changes
- Hid implementation fields
funcDepth
andcustomAsserts
- Rearranged elements around the library into a more pleasing order
v0.3.0
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
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 fromnewContext
, the old behavior can be recovered by settingprintWithColor
totrue
Others:
Context
's fields are now documented
v0.1.0
Initial release