test: improve unexpected warnings error
If someone adds an expectsWarning
listener without handling all
warnings triggered in that test file, it'll result in a cryptic error
message. This improves the situation by providing an explicit error
about the unexpected warning.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines