#[cfg(test)]
mod test_parser {
    use envkit::parser::parse_bool;
    use envkit::parser::parse_number;

    #[test]
    /// Tests for the `parse_bool` function.
    fn test_parse_bool() {
        assert_eq!(parse_bool("true"), Ok(true));
        assert_eq!(parse_bool("false"), Ok(false));
        assert_eq!(parse_bool("1"), Ok(true));
        assert_eq!(parse_bool("0"), Ok(false));
        assert_eq!(parse_bool("t"), Ok(true));
        assert_eq!(parse_bool("f"), Ok(false));
        assert_eq!(parse_bool("yes"), Ok(true));
        assert_eq!(parse_bool("no"), Ok(false));
    }

    #[test]
    /// Tests for the `parse_number` function.
    fn test_parse_number() {
        assert_eq!(parse_number::<i8>("42"), Ok(42_i8));
        assert_eq!(parse_number::<i16>("42"), Ok(42_i16));
        assert_eq!(parse_number::<i32>("42"), Ok(42_i32));
        assert_eq!(parse_number::<i64>("42"), Ok(42_i64));
        assert_eq!(parse_number::<i128>("42"), Ok(42_i128));
        assert_eq!(parse_number::<isize>("42"), Ok(42_isize));
        assert_eq!(parse_number::<u8>("42"), Ok(42_u8));
        assert_eq!(parse_number::<u16>("42"), Ok(42_u16));
        assert_eq!(parse_number::<u32>("42"), Ok(42_u32));
        assert_eq!(parse_number::<u64>("42"), Ok(42_u64));
        assert_eq!(parse_number::<u128>("42"), Ok(42_u128));
        assert_eq!(parse_number::<usize>("42"), Ok(42_usize));
        assert_eq!(parse_number::<f32>("42"), Ok(42_f32));
        assert_eq!(parse_number::<f64>("42"), Ok(42_f64));
    }
}
