summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vm/de.rs19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/vm/de.rs b/src/vm/de.rs
index dc3e9b3..471b541 100644
--- a/src/vm/de.rs
+++ b/src/vm/de.rs
@@ -196,7 +196,6 @@ impl<'pat, 'state, 'de, O: Serialize> Packer<'pat, 'state, O> {
             // iterate backwards
             let index = orig_len - index - 1;
             let frame = &mut self.interp.frames[index];
-            dbg!(index);
             let has_pack = frame.matches;
             if frame.overstep > 0 {
                 // handle overstep
@@ -843,10 +842,8 @@ where
             }
         }
         let obj = SerdeObject::Map(obj_inner);
-        dbg!(&self.interp.frames);
         let mut final_packs = self.step_out(output_packs);
         let mut iter_final_packs = 0..;
-        dbg!(&self.interp.frames);
         self.frames_mut().iter_active_mut().for_each(|frame| {
             let ty = frame.get_type();
             match ty {
@@ -1245,7 +1242,7 @@ mod tests {
             MAX_CALLS,
         ).deserialize(&mut der).unwrap();
         assert!(obj.is_none());
-        assert!(packs.len() == 1);
+        assert_eq!(packs.len(), 1);
         let pack = packs.pop().unwrap();
         assert!(pack.subpacks.is_empty());
     }
@@ -1284,9 +1281,9 @@ mod tests {
         ).deserialize(&mut der);
         let (mut packs, obj) = result.unwrap();
         assert!(obj.is_none());
-        assert!(packs.len() == 1);
+        assert_eq!(packs.len(), 1);
         let pack = packs.pop().unwrap();
-        assert!(pack.subpacks.len() == 2);
+        assert_eq!(pack.subpacks.len(), 2);
     }
 
     #[test]
@@ -1323,9 +1320,9 @@ mod tests {
         ).deserialize(&mut der);
         let (mut packs, obj) = result.unwrap();
         assert!(obj.is_none());
-        assert!(packs.len() == 1);
+        assert_eq!(packs.len(), 1);
         let pack = packs.pop().unwrap();
-        assert!(pack.subpacks.len() == 2);
+        assert_eq!(pack.subpacks.len(), 2);
     }
 
     #[test]
@@ -1362,9 +1359,11 @@ mod tests {
         ).deserialize(&mut der);
         let (mut packs, obj) = result.unwrap();
         assert!(obj.is_none());
-        assert!(packs.len() == 1);
+        assert_eq!(packs.len(), 1);
         let pack = packs.pop().unwrap();
-        assert!(pack.subpacks.len() == 2);
+        assert_eq!(pack.subpacks.len(), 2);
+        assert_eq!(pack.subpacks[0]["name"].1, SerdeObject::Str(From::from("a")));
+        assert_eq!(pack.subpacks[1]["value"].1, SerdeObject::U32(1));
     }
 }