Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions tooling/ast_fuzzer/src/compare/interpreted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
}

pub fn exec(&self) -> eyre::Result<CompareInterpretedResult> {
// Debug prints up frontin case the interpreter panics. Turn them on with `RUST_LOG=debug cargo test ...`

Check warning on line 77 in tooling/ast_fuzzer/src/compare/interpreted.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (frontin)
log::debug!("Program: \n{}\n", crate::DisplayAstAsNoir(&self.program));
log::debug!(
"ABI inputs: \n{}\n",
Expand Down Expand Up @@ -132,6 +132,18 @@
// To deal with this we ignore these errors as long as both passes fail the same way.
c1 == c2 && t1 == t2
}
(
Internal(InternalError::ConstantDoesNotFitInType { constant, .. }),
RangeCheckFailed { value, .. } | RangeCheckFailedWithMessage { value, .. },
)
| (
RangeCheckFailed { value, .. } | RangeCheckFailedWithMessage { value, .. },
Internal(InternalError::ConstantDoesNotFitInType { constant, .. }),
) => {
// The value should be a `NumericValue` display format, which is `<type> <value>`.
let value = value.split_once(' ').map(|(_, value)| value).unwrap_or(value);
value == constant.to_string()
}
(Internal(_), _) | (_, Internal(_)) => {
// We should not get, or ignore, internal errors.
// They mean the interpreter got something unexpected that we need to fix.
Expand Down Expand Up @@ -302,7 +314,7 @@
AbiType::Integer { sign: Sign::Unsigned, width } => types.push(Type::unsigned(*width)),
AbiType::Boolean => types.push(Type::bool()),
AbiType::Struct { path: _, fields } => {
// Structs are flattend

Check warning on line 317 in tooling/ast_fuzzer/src/compare/interpreted.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (flattend)
for (_, typ) in fields {
append_input_type_to_ssa(typ, types);
}
Expand Down
Loading