mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fix assert in functions that return values
This commit is contained in:
parent
b9a24e3b51
commit
d73586743b
@ -2663,7 +2663,7 @@ if (!$tmp) {
|
|||||||
eprintln(tos3("${filename}:${p.scanner.line_nr}: FAILED: ${cfname}()"));
|
eprintln(tos3("${filename}:${p.scanner.line_nr}: FAILED: ${cfname}()"));
|
||||||
eprintln(tos3("Source: $sourceline"));
|
eprintln(tos3("Source: $sourceline"));
|
||||||
v_panic(tos3("An assertion failed."));
|
v_panic(tos3("An assertion failed."));
|
||||||
return;
|
exit(1);
|
||||||
} else {
|
} else {
|
||||||
g_test_oks++;
|
g_test_oks++;
|
||||||
}
|
}
|
||||||
@ -2680,7 +2680,7 @@ if (!$tmp) {
|
|||||||
tos3("$sourceline"),
|
tos3("$sourceline"),
|
||||||
tos3("$p.cur_fn.name()")
|
tos3("$p.cur_fn.name()")
|
||||||
);
|
);
|
||||||
return;
|
exit(1);
|
||||||
// TODO
|
// TODO
|
||||||
// Maybe print all vars in a test function if it fails?
|
// Maybe print all vars in a test function if it fails?
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user