diff --git a/tests/test.rs b/tests/test.rs index 8d9a5942a..83f1620be 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -2018,6 +2018,14 @@ fn test_deny_non_finite_f64_key() { assert!(serde_json::to_value(map).is_err()); } +#[test] +fn test_boolean_key() { + let map = treemap!(false => 0, true => 1); + let j = r#"{"false":0,"true":1}"#; + test_encode_ok(&[(&map, j)]); + test_parse_ok(vec![(j, map)]); +} + #[test] fn test_borrowed_key() { let map: BTreeMap<&str, ()> = from_str("{\"borrowed\":null}").unwrap();