Add test for deserializing named units

This commit is contained in:
Erick Tryzelaar 2015-03-07 21:40:53 -08:00
parent 6e51195930
commit 21e6d3163f

View File

@ -27,6 +27,7 @@ trait Trait {
#[derive(Debug, PartialEq)] #[derive(Debug, PartialEq)]
#[derive_serialize] #[derive_serialize]
#[derive_deserialize]
struct NamedUnit; struct NamedUnit;
#[derive(Debug, PartialEq)] #[derive(Debug, PartialEq)]
@ -78,13 +79,11 @@ fn test_named_unit() {
Value::Null Value::Null
); );
/*
let v = json::from_str("null").unwrap(); let v = json::from_str("null").unwrap();
assert_eq!(v, named_unit); assert_eq!(v, named_unit);
let v = json::from_value(Value::Null).unwrap(); let v = json::from_value(Value::Null).unwrap();
assert_eq!(v, named_unit); assert_eq!(v, named_unit);
*/
} }
#[test] #[test]