Fix error not reported if at least one other error expected. (#485)

* fix error not reported if at least one other error expected.

* Fixed unused extern crate error if wasm feature is not enabled.

* No longer reporting deref cycles multiple times.

* Fix filetest type_check.clif.

* Switched comparison order for perf.

* Fixed isa/riscv/verify-encoding.clif filetest.
This commit is contained in:
Grégoire Geis
2018-08-28 19:33:46 +02:00
committed by Dan Gohman
parent 9eee91fc12
commit 0e67255f52
5 changed files with 17 additions and 5 deletions

View File

@@ -66,7 +66,7 @@ impl SubTest for TestVerifier {
for expect in expected {
let pos = errors
.iter()
.position(|err| err.message.contains(expect.1) && err.location == expect.0);
.position(|err| err.location == expect.0 && err.message.contains(expect.1));
match pos {
None => {
@@ -78,6 +78,11 @@ impl SubTest for TestVerifier {
}
}
// report remaining errors
for err in errors {
write!(msg, "unexpected error {}", err).unwrap();
}
if msg.is_empty() {
Ok(())
} else {