the lone unittest runs woo

main
bel 2023-11-26 22:25:08 -07:00
parent d565e9d382
commit 3531323de0
1 changed files with 4 additions and 3 deletions

View File

@ -6,9 +6,10 @@ fn main() {
#[derive(Debug, PartialEq, Serialize, Deserialize)] #[derive(Debug, PartialEq, Serialize, Deserialize)]
struct Storage { struct Storage {
adds: []Add, adds: Vec<Add>,
} }
#[derive(Debug, PartialEq, Serialize, Deserialize)]
struct Add { struct Add {
t: i64, t: i64,
add: String, add: String,
@ -27,10 +28,10 @@ mod tests {
fn test_testdata_standalone_yaml() { fn test_testdata_standalone_yaml() {
assert_eq!( assert_eq!(
load_storage("./testdata/standalone.yaml".to_string()).expect("cant load standalone.yaml"), load_storage("./testdata/standalone.yaml".to_string()).expect("cant load standalone.yaml"),
Storage{adds: { Storage{adds: vec![
Add{t: 1, add: "def".to_string(), tag: "abc".to_string()}, Add{t: 1, add: "def".to_string(), tag: "abc".to_string()},
Add{t: 2, add: "ghi".to_string(), tag: "".to_string()}, Add{t: 2, add: "ghi".to_string(), tag: "".to_string()},
}}, ]},
); );
} }
} }