person_struct_parser 0.1.0

Rust parser
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use person_struct_parser::person_module::*;

#[cfg(test)]
mod simple_tests {
    use super::*;

    #[test]
    fn test_normalize() -> anyhow::Result<()> {
        let mut p: Person = Person {
            name: String::from("aNakIN"),
            age: 23,
            city: String::from("cORuSAnT"),
        };
        assert_eq!(p.normalize().to_string(), "Anakin-23-Corusant");

        Ok(())
    }
}