mirror of
https://github.com/zaphar/ucg.git
synced 2025-07-22 18:19:54 -04:00
FIX: compile errors weren't treated as a numbered assertion.
This commit is contained in:
parent
016e4a22db
commit
0537cb6166
@ -1512,7 +1512,7 @@ impl<'a> FileBuilder<'a> {
|
||||
scope: &Scope,
|
||||
) -> Result<Rc<Val>, Box<dyn Error>> {
|
||||
if !self.validate_mode {
|
||||
// we are not in validate_mode then build_asserts are noops.
|
||||
// we are not in validate_mode so build_asserts are noops.
|
||||
return Ok(Rc::new(Val::Empty));
|
||||
}
|
||||
let ok = match self.eval_expr(expr, scope) {
|
||||
@ -1520,9 +1520,7 @@ impl<'a> FileBuilder<'a> {
|
||||
Err(e) => {
|
||||
// failure!
|
||||
let msg = format!("CompileError: {}\n", e);
|
||||
self.assert_collector.summary.push_str(&msg);
|
||||
self.assert_collector.failures.push_str(&msg);
|
||||
self.assert_collector.success = false;
|
||||
self.record_assert_result(&msg, false);
|
||||
return Ok(Rc::new(Val::Empty));
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user