()
| 49 | |
| 50 | #[test] |
| 51 | fn test_attribute_definition_parser() { |
| 52 | let values = [ |
| 53 | ( |
| 54 | "name: string", |
| 55 | AttributeDefinition { |
| 56 | name: "name".to_string(), |
| 57 | data_type: DataType::String, |
| 58 | }, |
| 59 | ), |
| 60 | ( |
| 61 | "age: int", |
| 62 | AttributeDefinition { |
| 63 | name: "age".to_string(), |
| 64 | data_type: DataType::Int, |
| 65 | }, |
| 66 | ), |
| 67 | ( |
| 68 | "date_of_birth: date", |
| 69 | AttributeDefinition { |
| 70 | name: "date_of_birth".to_string(), |
| 71 | data_type: DataType::Date, |
| 72 | }, |
| 73 | ), |
| 74 | ]; |
| 75 | |
| 76 | for (source, expected) in values { |
| 77 | let (_, parsed) = parse_attribute_definition(source).unwrap(); |
| 78 | |
| 79 | assert_eq!(parsed, expected); |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | #[test] |
| 84 | fn test_attribute_definitions_parser() { |
nothing calls this directly
no test coverage detected