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
* 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>

10
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
}
}

Loading…
Cancel
Save