Skip to content

Commit 8c6a1ce

Browse files
committed
ser numeric keys test
1 parent 2a9d554 commit 8c6a1ce

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/ser.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ fn serialize_object() {
136136
}),
137137
Ok("{\n width: 1920,\n height: 1080,\n \"aspect-ratio\": \"16:9\",\n}".to_owned())
138138
);
139+
assert_eq!(
140+
to_string(&IndexMap::from([(0, "zero"), (1, "one")])),
141+
Ok("{\n \"0\": \"zero\",\n \"1\": \"one\",\n}".to_owned())
142+
);
139143

140144
assert_eq!(
141145
to_string(&IndexMap::from([(E::A, 'a'), (E::B, 'b'), (E::C(()), 'c')])),

0 commit comments

Comments
 (0)