Skip to content

Commit a16b19c

Browse files
committed
add unit test with multiple casing
1 parent 8144b70 commit a16b19c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/field_attributes.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,14 @@ wrap_option_number_from_string_fn!(
601601
/// let a: MyStruct = serde_json::from_str(s).unwrap();
602602
/// assert!(!a.boolean);
603603
///
604+
/// /// let s = r#"{ "boolean": "TruE" }"#;
605+
/// let a: MyStruct = serde_json::from_str(s).unwrap();
606+
/// assert!(a.boolean);
607+
///
608+
/// let s = r#"{ "boolean": "fAlsE" }"#;
609+
/// let a: MyStruct = serde_json::from_str(s).unwrap();
610+
/// assert!(!a.boolean);
611+
///
604612
/// let s = r#"{ "boolean": "true" }"#;
605613
/// let a: MyStruct = serde_json::from_str(s).unwrap();
606614
/// assert!(a.boolean);

0 commit comments

Comments
 (0)