test new_unique_id()
This commit is contained in:
parent
280dea62ae
commit
eb5a0f1344
|
@ -185,7 +185,7 @@ impl Unquote for String {
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
use crate::{from_base36, ToBase36, optional_data_line, mock, segments_from_string, Quote, Unquote};
|
use crate::{from_base36, ToBase36, optional_data_line, mock, segments_from_string, Quote, Unquote, new_unique_id};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_from_base36() {
|
fn test_from_base36() {
|
||||||
|
@ -234,4 +234,11 @@ mod test {
|
||||||
let expected = "who the fuck is scraeming \"LOG OFF\" at my house.\nshow yourself, coward.\ni will never log off".to_string();
|
let expected = "who the fuck is scraeming \"LOG OFF\" at my house.\nshow yourself, coward.\ni will never log off".to_string();
|
||||||
assert_eq!(output, expected);
|
assert_eq!(output, expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_new_unique_id() {
|
||||||
|
assert_eq!(new_unique_id(vec!["0".to_string(), "2".to_string()]), "1".to_string());
|
||||||
|
assert_eq!(new_unique_id(vec!["0".to_string(), "1".to_string()]), "2".to_string());
|
||||||
|
assert_eq!(new_unique_id(vec!["1".to_string(), "z".to_string()]), "0".to_string());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue