Skip to content

Commit

Permalink
feat(#28): test message
Browse files Browse the repository at this point in the history
  • Loading branch information
h1alexbel committed Oct 7, 2024
1 parent 92f6863 commit cb265e1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/transpiler/errors/invalid_application_ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ impl Check for InvalidApplicationRef {
applications.iter().for_each(|a| {
if !refs.contains(a) {
errors.push(format!(
"Invalid application -> {}; Ref `{}` does not exist ",
"Invalid application -> {}; Ref `{}` does not exist",
a, a
));
}
Expand All @@ -65,7 +65,12 @@ mod tests {
let transpiler =
Fslt::program(sample_program("errors/invalid-application-ref.fsl"));
let errors = InvalidApplicationRef {}.inspect(&transpiler.out());
assert_that!(errors.is_empty(), is(equal_to(false)));
assert_that!(
errors.first().expect("failed to get first error"),
is(equal_to(
"Invalid application -> \"x\"; Ref `\"x\"` does not exist"
))
);
Ok(())
}
}

0 comments on commit cb265e1

Please # to comment.