Skip to content

Commit 3e9a71d

Browse files
committed
FEAT: added counter of asserts in current test (so failed asserts are easier to find)
1 parent 7b71667 commit 3e9a71d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/tests/quick-test-module.r3

+4-2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ qt-file-asserts: 0
3636
qt-file-passes: 0
3737
qt-file-failures: 0
3838
qt-file-incompatible: 0
39+
qt-test-assert: 0
3940

4041
;- names
4142
qt-run-name:
@@ -109,6 +110,7 @@ start-test: func [
109110
title [string!]
110111
][
111112
qt-test-name: title
113+
qt-test-assert: 0
112114
qt-file-tests: qt-file-tests + 1
113115
qt-red-only: false
114116
]
@@ -121,7 +123,7 @@ assert: func [
121123
assertion [logic!]
122124
][
123125
qt-file-asserts: qt-file-asserts + 1
124-
126+
qt-test-assert: qt-test-assert + 1
125127
either assertion [
126128
qt-file-passes: qt-file-passes + 1
127129
][
@@ -136,7 +138,7 @@ assert: func [
136138
]
137139
]
138140
prin "--test-- "
139-
prin qt-test-name
141+
prin [qt-test-name qt-test-assert]
140142
print either qt-red-only [
141143
" not like Red********"
142144
][ " FAILED**************"]

0 commit comments

Comments
 (0)