Skip to content

Commit

Permalink
Fix font-awesome-as-a-crate tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Urgau authored and syphar committed Feb 14, 2024
1 parent a522135 commit f7a077a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions crates/font-awesome-as-a-crate/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,16 @@ pub const fn svg(type_: Type, name: &str) -> Result<&'static str, NameError> {
#[cfg(test)]
mod tests {
const fn usable_as_const_() {
assert!(crate::svg(crate::Type::Solid, "cog").is_ok());
assert!(crate::svg(crate::Type::Solid, "gear").is_ok());
}
#[test]
fn usable_as_const() {
usable_as_const_();
}
#[test]
fn it_works() {
assert!(crate::svg(crate::Type::Solid, "cog").is_ok());
assert!(crate::svg(crate::Type::Solid, "snuffleupigus").is_err());
assert!(crate::svg(crate::Type::Solid, "gear").is_ok());
assert!(crate::svg(crate::Type::Solid, "download").is_ok());
assert!(crate::svg(crate::Type::Solid, "giberich").is_err());
}
}

0 comments on commit f7a077a

Please sign in to comment.