We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6477e74 commit f4289daCopy full SHA for f4289da
1 file changed
core/src/types.rs
@@ -275,3 +275,20 @@ impl NumValue for u64 {}
275
impl NumValue for u32 {}
276
impl NumValue for u16 {}
277
impl NumValue for u8 {}
278
+
279
+#[cfg(test)]
280
+mod tests {
281
+ use std::str::FromStr;
282
283
+ use crate::{errors::GraphAnnisCoreError, types::DefaultComponentType};
284
285
+ #[test]
286
+ fn parse_invalid_component_type() {
287
+ let result = DefaultComponentType::from_str("doesnotexist");
288
+ assert!(result.is_err());
289
+ assert!(matches!(
290
+ result.unwrap_err(),
291
+ GraphAnnisCoreError::InvalidComponentType(_)
292
+ ));
293
+ }
294
+}
0 commit comments