Skip to content

Commit

Permalink
assert unused keys is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Emilgardis committed Apr 7, 2022
1 parent 05b4a3b commit c2563d4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/cross_toml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,10 @@ mod tests {
targets: HashMap::new(),
build: CrossBuildConfig::default(),
};
let (parsed_cfg, _) = CrossToml::parse("")?;
let (parsed_cfg, unused) = CrossToml::parse("")?;

assert_eq!(parsed_cfg, cfg);
assert!(unused.is_empty());

Ok(())
}
Expand All @@ -157,9 +158,10 @@ mod tests {
volumes = ["VOL1_ARG", "VOL2_ARG"]
passthrough = ["VAR1", "VAR2"]
"#;
let (parsed_cfg, _) = CrossToml::parse(test_str)?;
let (parsed_cfg, unused) = CrossToml::parse(test_str)?;

assert_eq!(parsed_cfg, cfg);
assert!(unused.is_empty());

Ok(())
}
Expand Down Expand Up @@ -195,9 +197,10 @@ mod tests {
xargo = false
image = "test-image"
"#;
let (parsed_cfg, _) = CrossToml::parse(test_str)?;
let (parsed_cfg, unused) = CrossToml::parse(test_str)?;

assert_eq!(parsed_cfg, cfg);
assert!(unused.is_empty());

Ok(())
}
Expand Down

0 comments on commit c2563d4

Please sign in to comment.