diff options
author | Jacob Bachmeyer <jcb@gnu.org> | 2022-10-01 19:45:06 -0500 |
---|---|---|
committer | Jacob Bachmeyer <jcb@gnu.org> | 2022-10-01 19:45:06 -0500 |
commit | bbc86915e45674be1f83bf341d76f37331496fc1 (patch) | |
tree | 9c16c0a1d991dcef21024f179896cbd2109c2317 | |
parent | 51e4b3f6891b42bfa3b5617a0a52193348f74efe (diff) |
Avoid needless errors in internal unit test infrastructure
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | testsuite/runtest.libs/mockutil.tcl | 10 |
2 files changed, 9 insertions, 4 deletions
@@ -2,6 +2,9 @@ PR58065 + * testsuite/runtest.libs/mockutil.tcl (test_proc_with_mocks): + Report test failure instead of raising errors. + * testsuite/runtest.libs/dg.test: Add more unit tests. 2022-09-30 Jacob Bachmeyer <jcb@gnu.org> diff --git a/testsuite/runtest.libs/mockutil.tcl b/testsuite/runtest.libs/mockutil.tcl index 20b6b9b..4614274 100644 --- a/testsuite/runtest.libs/mockutil.tcl +++ b/testsuite/runtest.libs/mockutil.tcl @@ -236,8 +236,9 @@ proc test_proc_with_mocks { name sicmd code args } { } elseif { $callpos eq "U" } { # prefix selects one unique call if { [llength $calls] != 1 } { - error "expected unique call" - return + verbose " expected unique call... failed!" + set result fail + continue } if { ![match_argpat $argpat [lindex $calls 0]] } { verbose " failed!" @@ -249,8 +250,9 @@ proc test_proc_with_mocks { name sicmd code args } { set result fail } } else { - error "failed to select trace record" - return + verbose " expected trace record not found... failed!" + set result fail + continue } } |