Skip to content

Commit

Permalink
Prefix tests with an index.
Browse files Browse the repository at this point in the history
  • Loading branch information
q-uint committed Mar 26, 2022
1 parent d76d98d commit 33aa8e0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ $(vessel bin)/moc -r test/add.test.mo

```text
πŸ“„ Add
🟒 add 2
0. 🟒 add 2
πŸ’¬ expected: 12, actual: 10
πŸ›‘ oops...
1. πŸ›‘ oops...
🟒 1/2 | πŸ›‘ 1/2
```
Expand Down
4 changes: 2 additions & 2 deletions src/Suite.mo
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ module {
case (#Test(name, test)) {
if (k != 0) print("");
if (test(print)) {
print("🟒 " # name);
print(debug_show(k) # ". 🟒 " # name);
s.pass();
} else {
print("πŸ›‘ " # name);
print(debug_show(k) # ". πŸ›‘ " # name);
s.fail();
};
};
Expand Down
4 changes: 2 additions & 2 deletions src/SuiteState.mo
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ module {
_beforeEach(state);
if (k != 0) print("");
if (test(state, print)) {
print("🟒 " # name);
print(debug_show(k) # ". 🟒 " # name);
s.pass();
} else {
print("πŸ›‘ " # name);
print(debug_show(k) # ". πŸ›‘ " # name);
s.fail();
};
_afterEach(state);
Expand Down

0 comments on commit 33aa8e0

Please sign in to comment.