add overall test
This commit is contained in:
parent
3fd7978b63
commit
fa50107a04
2 changed files with 11 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,2 @@
|
||||||
/target
|
/target
|
||||||
.idea
|
.idea
|
||||||
pkg
|
|
10
src/lib.rs
10
src/lib.rs
|
@ -12,3 +12,13 @@ mod utils;
|
||||||
pub fn convert_to_hiragana(text: &str) -> String {
|
pub fn convert_to_hiragana(text: &str) -> String {
|
||||||
romanize(text).iter().map(|r| to_hiragana(r)).collect()
|
romanize(text).iter().map(|r| to_hiragana(r)).collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use super::*;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_convert_to_hiragana() {
|
||||||
|
assert_eq!(convert_to_hiragana("assolutamente"), "あっそるためんて");
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue