File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ fn test_file() {
16
16
place : Place ,
17
17
#[ serde( rename = "arr" ) ]
18
18
elements : Vec < String > ,
19
+ nullable : Option < String > ,
19
20
}
20
21
21
22
#[ derive( Debug , Deserialize ) ]
@@ -52,7 +53,8 @@ fn test_file() {
52
53
}
53
54
},
54
55
"FOO": "FOO should be overridden",
55
- "bar": "I am bar"
56
+ "bar": "I am bar",
57
+ "nullable": null
56
58
}
57
59
"# ,
58
60
FileFormat :: Json ,
@@ -92,6 +94,7 @@ fn test_file() {
92
94
"John Smith" . to_owned( )
93
95
) ;
94
96
}
97
+ assert_eq ! ( s. nullable, None ) ;
95
98
}
96
99
97
100
#[ test]
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ fn test_file() {
16
16
place : Place ,
17
17
#[ serde( rename = "arr" ) ]
18
18
elements : Vec < String > ,
19
+ nullable : Option < String > ,
19
20
}
20
21
21
22
#[ derive( Debug , Deserialize ) ]
@@ -54,7 +55,8 @@ fn test_file() {
54
55
}
55
56
),
56
57
FOO: "FOO should be overridden",
57
- bar: "I am bar"
58
+ bar: "I am bar",
59
+ nullable: None
58
60
)
59
61
"# ,
60
62
FileFormat :: Ron ,
@@ -95,6 +97,7 @@ fn test_file() {
95
97
"John Smith" . to_owned( )
96
98
) ;
97
99
}
100
+ assert_eq ! ( s. nullable, None ) ;
98
101
}
99
102
100
103
#[ test]
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ fn test_file() {
18
18
place : Place ,
19
19
#[ serde( rename = "arr" ) ]
20
20
elements : Vec < String > ,
21
+ nullable : Option < String > ,
21
22
}
22
23
23
24
#[ derive( Debug , Deserialize ) ]
52
53
# For override tests
53
54
FOO: FOO should be overridden
54
55
bar: I am bar
56
+ nullable: null
55
57
"# ,
56
58
FileFormat :: Yaml ,
57
59
) )
@@ -90,6 +92,7 @@ bar: I am bar
90
92
"John Smith" . to_owned( )
91
93
) ;
92
94
}
95
+ assert_eq ! ( s. nullable, None ) ;
93
96
}
94
97
95
98
#[ test]
You can’t perform that action at this time.
0 commit comments