Show trace logs as part of the test output when any.

```
  ┍━ test ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  │ PASS [mem: 6370, cpu: 2591822] trace_1
  │ ↳ is negative
  │ ↳ is non-negative
  ┕━━━━━━━━━ 1 tests | 1 passed | 0 failed
  ```
This commit is contained in:
KtorZ
2022-12-20 15:16:05 +01:00
committed by Lucas
parent 2fc14c7c1f
commit 9068c89c00
4 changed files with 45 additions and 11 deletions

View File

@@ -1,5 +1,14 @@
use aiken/builtin
test trace_1() {
builtin.trace("foo", True)
fn is_negative(i : Int) -> Bool {
if i < 0 {
builtin.trace("is negative", True)
} else {
builtin.trace("is non-negative", False)
}
}
test trace_1() {
is_negative(-14) && !is_negative(42)
}