mirror of
https://github.com/zaphar/ucg.git
synced 2025-07-25 18:49:50 -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,
|
scope: &Scope,
|
||||||
) -> Result<Rc<Val>, Box<dyn Error>> {
|
) -> Result<Rc<Val>, Box<dyn Error>> {
|
||||||
if !self.validate_mode {
|
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));
|
return Ok(Rc::new(Val::Empty));
|
||||||
}
|
}
|
||||||
let ok = match self.eval_expr(expr, scope) {
|
let ok = match self.eval_expr(expr, scope) {
|
||||||
@ -1520,9 +1520,7 @@ impl<'a> FileBuilder<'a> {
|
|||||||
Err(e) => {
|
Err(e) => {
|
||||||
// failure!
|
// failure!
|
||||||
let msg = format!("CompileError: {}\n", e);
|
let msg = format!("CompileError: {}\n", e);
|
||||||
self.assert_collector.summary.push_str(&msg);
|
self.record_assert_result(&msg, false);
|
||||||
self.assert_collector.failures.push_str(&msg);
|
|
||||||
self.assert_collector.success = false;
|
|
||||||
return Ok(Rc::new(Val::Empty));
|
return Ok(Rc::new(Val::Empty));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user