From 0671603282fadef01afa08e5cfd33c3a0dca0fdb Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 21 Aug 2022 12:59:04 -0700 Subject: [PATCH] Cover all the Value variants in indented Debug test --- tests/debug.rs | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/tests/debug.rs b/tests/debug.rs index 07e614ee2..ba4093897 100644 --- a/tests/debug.rs +++ b/tests/debug.rs @@ -53,17 +53,34 @@ fn error() { #[test] fn indented() { - let j = json!({ "array": [0, 1] }); + let j = json!({ + "Null": null, + "Bool": true, + "Number": 1, + "String": "...", + "Array": [true], + "EmptyArray": [], + "EmptyObject": {} + }); let expected = indoc! {r#" Object({ - "array": Array([ - Number( - 0, - ), - Number( - 1, + "Array": Array([ + Bool( + true, ), ]), + "Bool": Bool( + true, + ), + "EmptyArray": Array([]), + "EmptyObject": Object({}), + "Null": Null, + "Number": Number( + 1, + ), + "String": String( + "...", + ), })"# }; assert_eq!(format!("{:#?}", j), expected);