-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(libmake): ✅ add new test for
ascii_macros.rs
- Loading branch information
1 parent
9bf7069
commit f943c7a
Showing
2 changed files
with
25 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#[cfg(test)] | ||
mod tests { | ||
use libmake::macro_ascii; | ||
|
||
#[test] | ||
fn test_macro_ascii_success() { | ||
let art = macro_ascii!("Hi"); | ||
assert_eq!(art, " _ _ _ \n | | | | (_)\n | |_| | | |\n | _ | | |\n |_| |_| |_|\n \n"); | ||
} | ||
|
||
#[test] | ||
#[should_panic(expected = "Failed to generate ASCII art: Failed to convert text to ASCII art")] | ||
fn test_macro_ascii_empty_input() { | ||
let _art = macro_ascii!(""); | ||
} | ||
|
||
#[test] | ||
#[should_panic(expected = "Failed to generate ASCII art: Failed to convert text to ASCII art")] | ||
fn test_macro_ascii_invalid_input() { | ||
let _art = macro_ascii!("🦀"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters