1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

tests: do not panic on failed tests, just warn and exit(1).

This commit is contained in:
Delyan Angelov 2020-10-14 23:42:30 +03:00
parent 9e16576380
commit 5a11b87097
2 changed files with 4 additions and 2 deletions

View File

@ -79,6 +79,7 @@ fn main() {
tsession.test()
eprintln(tsession.benchmark.total_message(title))
if tsession.benchmark.nfail > 0 {
panic('\nWARNING: failed $tsession.benchmark.nfail times.\n')
eprintln('\nWARNING: failed $tsession.benchmark.nfail times.\n')
exit(1)
}
}

View File

@ -49,7 +49,8 @@ fn v_test_formatting(vargs string) {
vfmt_test_session.test()
eprintln(vfmt_test_session.benchmark.total_message('running vfmt over V files'))
if vfmt_test_session.benchmark.nfail > 0 {
panic('\nWARNING: v fmt failed ${vfmt_test_session.benchmark.nfail} times.\n')
eprintln('\nWARNING: v fmt failed ${vfmt_test_session.benchmark.nfail} times.\n')
exit(1)
}
}