mirror of
https://github.com/bytedream/serde-inline-default.git
synced 2025-05-09 12:15:13 +02:00
test: add string default to test
This commit is contained in:
parent
6bb8576fa8
commit
ba2c2133a5
@ -17,6 +17,8 @@ fn test_serde_inline_default() {
|
||||
inline: u32,
|
||||
#[serde_inline_default(-1337)]
|
||||
inline_negative: i32,
|
||||
#[serde_inline_default("string".to_string())]
|
||||
string: String,
|
||||
}
|
||||
|
||||
let test: Test = serde_json::from_value(json!({})).unwrap();
|
||||
@ -24,4 +26,5 @@ fn test_serde_inline_default() {
|
||||
assert_eq!(test.native, 69);
|
||||
assert_eq!(test.inline, 420);
|
||||
assert_eq!(test.inline_negative, -1337);
|
||||
assert_eq!(test.string, "string".to_string());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user