Skip to content
Snippets Groups Projects
Commit 92341e92 authored by Guillaume Desmottes's avatar Guillaume Desmottes :goat: Committed by Sebastian Dröge
Browse files

WIP: test Structure string conversions

parent a8e2fac4
No related branches found
No related tags found
Loading
......@@ -673,4 +673,15 @@ mod tests {
assert_eq!(s.get::<&str>("f2").unwrap(), "bcd");
assert_eq!(s.get::<i32>("f3").unwrap(), 123i32);
}
#[test]
fn test_string_conversion() {
let a = "Test, f1=(string)abc, f2=(uint)123";
let s = Structure::from_string(&a).unwrap();
assert_eq!(s.get::<&str>("f1").unwrap(), "abc");
assert_eq!(s.get::<u32>("f2").unwrap(), 123);
assert_eq!(a, s.to_string());
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment