Actually fully test deserializing structs

This commit is contained in:
Erick Tryzelaar 2014-05-28 08:10:52 -07:00
parent 77a10caf34
commit 88631b57cb

View File

@ -3000,15 +3000,15 @@ mod tests {
fn test_decode_struct() {
let s = "{
\"inner\": [
{ \"a\": null, \"b\": 2, \"c\": [\"abc\", \"xyz\"] }
]
}";
//{ \"a\": null, \"b\": 2, \"c\": [\"abc\", \"xyz\"] }
let v: Outer = from_iter(s.chars()).unwrap();
assert_eq!(
v,
Outer {
inner: vec![
//Inner { a: (), b: 2, c: vec!["abc".to_strbuf(), "xyz".to_strbuf()] }
Inner { a: (), b: 2, c: vec!["abc".to_strbuf(), "xyz".to_strbuf()] }
]
}
);