Skip to content

Commit

Permalink
Update tests so that tokens include peace::cfg:: prefix.
Browse files Browse the repository at this point in the history
  • Loading branch information
azriel91 committed Jan 10, 2024
1 parent b219161 commit 391f227
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions crate/static_check_macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,10 @@ mod tests {
None,
);

assert_eq!(r#"Ty :: new_unchecked ("_")"#, tokens.to_string());
assert_eq!(
r#"peace :: cfg :: Ty :: new_unchecked ("_")"#,
tokens.to_string()
);
}

#[test]
Expand All @@ -242,15 +245,21 @@ mod tests {
"Ty",
None,
);
assert_eq!(r#"Ty :: new_unchecked ("a")"#, tokens.to_string());
assert_eq!(
r#"peace :: cfg :: Ty :: new_unchecked ("a")"#,
tokens.to_string()
);

let tokens = ensure_valid_id(
&LitStrMaybe(Some(LitStr::new("A", Span::call_site()))),
"Ty",
None,
);

assert_eq!(r#"Ty :: new_unchecked ("A")"#, tokens.to_string());
assert_eq!(
r#"peace :: cfg :: Ty :: new_unchecked ("A")"#,
tokens.to_string()
);
}

#[test]
Expand Down

0 comments on commit 391f227

Please sign in to comment.