Browse Source

Avoid needless errors in internal unit test infrastructure

master
Jacob Bachmeyer 4 years ago
parent
commit
bbc86915e4
  1. 3
      ChangeLog
  2. 10
      testsuite/runtest.libs/mockutil.tcl

3
ChangeLog

@ -2,6 +2,9 @@
PR58065 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. * testsuite/runtest.libs/dg.test: Add more unit tests.
2022-09-30 Jacob Bachmeyer <jcb@gnu.org> 2022-09-30 Jacob Bachmeyer <jcb@gnu.org>

10
testsuite/runtest.libs/mockutil.tcl

@ -236,8 +236,9 @@ proc test_proc_with_mocks { name sicmd code args } {
} elseif { $callpos eq "U" } { } elseif { $callpos eq "U" } {
# prefix selects one unique call # prefix selects one unique call
if { [llength $calls] != 1 } { if { [llength $calls] != 1 } {
error "expected unique call" verbose " expected unique call... failed!"
return set result fail
continue
} }
if { ![match_argpat $argpat [lindex $calls 0]] } { if { ![match_argpat $argpat [lindex $calls 0]] } {
verbose " failed!" verbose " failed!"
@ -249,8 +250,9 @@ proc test_proc_with_mocks { name sicmd code args } {
set result fail set result fail
} }
} else { } else {
error "failed to select trace record" verbose " expected trace record not found... failed!"
return set result fail
continue
} }
} }

Loading…
Cancel
Save