From 62c84297e5340d717d89c5c0b36ed86dd5ad9d2f Mon Sep 17 00:00:00 2001 From: David Orchard Date: Wed, 28 Jul 2021 22:49:48 -0700 Subject: Create test cases to demonstrate lossy map order --- tests/file_hjson.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'tests/file_hjson.rs') diff --git a/tests/file_hjson.rs b/tests/file_hjson.rs index 4002a90..96fe8b1 100644 --- a/tests/file_hjson.rs +++ b/tests/file_hjson.rs @@ -60,8 +60,15 @@ fn test_file() { assert_eq!(s.elements.len(), 10); assert_eq!(s.elements[3], "4".to_string()); assert_eq!( - s.place.creator["name"].clone().into_string().unwrap(), - "John Smith".to_string() + s.place + .creator + .into_iter() + .collect::>(), + vec![ + ("name".to_string(), "John Smith".into()), + ("username".into(), "jsmith".into()), + ("email".into(), "jsmith@localhost".into()), + ] ); } -- cgit v1.2.3