Skip to main content

elo_rust/stdlib/
types.rs

1//! Type checking functions
2
3/// Type checking function signatures
4pub const TYPE_FUNCTIONS: &[&str] = &["is_null", "is_some", "is_empty", "is_string", "is_number"];
5
6#[cfg(test)]
7mod tests {
8    use super::*;
9
10    #[test]
11    fn test_type_functions_count() {
12        assert_eq!(TYPE_FUNCTIONS.len(), 5);
13    }
14
15    #[test]
16    fn test_is_null_function_exists() {
17        assert!(TYPE_FUNCTIONS.contains(&"is_null"));
18    }
19
20    #[test]
21    fn test_all_type_functions_exist() {
22        assert!(TYPE_FUNCTIONS.contains(&"is_some"));
23        assert!(TYPE_FUNCTIONS.contains(&"is_empty"));
24        assert!(TYPE_FUNCTIONS.contains(&"is_string"));
25    }
26}