Add a location to verifier error messages.
The verifier reports the 'location' of an error message as a reference to the entity that has a problem. This uses the 'AnyEntity' type to refer to instructions/values/ebbs etc. Also add an err! macro similar to the one used by the parser.
This commit is contained in:
@@ -41,7 +41,7 @@ fn verifier_tests_from_source(function_source: &str) {
|
||||
let result = Verifier::new(&func).run();
|
||||
match verifier_results[i] {
|
||||
Some(ref re) => {
|
||||
assert_eq!(re.is_match(&result.err().unwrap()), true);
|
||||
assert_eq!(re.is_match(&result.err().unwrap().message), true);
|
||||
},
|
||||
None => {
|
||||
assert_eq!(result, Ok(()));
|
||||
|
||||
Reference in New Issue
Block a user