mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-05 18:20:34 +00:00
main: replace assert_eq!(..., true/false) with assert!()
BUG=b:197251702 TEST=bin/clippy # with rust-toolchain = 1.54.0 Change-Id: I80b8a5e4a90f2d6aefafd3d0d4b64b6751163b25 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3108611 Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org> Reviewed-by: Allen Webb <allenwebb@google.com>
This commit is contained in:
parent
166d1ddfbe
commit
5e9959e8f5
1 changed files with 4 additions and 4 deletions
|
@ -3018,7 +3018,7 @@ mod tests {
|
||||||
.expect("parse should succeed");
|
.expect("parse should succeed");
|
||||||
assert_eq!(config.plugin_mounts[0].src, PathBuf::from("/dev/null"));
|
assert_eq!(config.plugin_mounts[0].src, PathBuf::from("/dev/null"));
|
||||||
assert_eq!(config.plugin_mounts[0].dst, PathBuf::from("/dev/zero"));
|
assert_eq!(config.plugin_mounts[0].dst, PathBuf::from("/dev/zero"));
|
||||||
assert_eq!(config.plugin_mounts[0].writable, true);
|
assert!(config.plugin_mounts[0].writable);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
@ -3026,15 +3026,15 @@ mod tests {
|
||||||
let mut config = Config::default();
|
let mut config = Config::default();
|
||||||
set_argument(&mut config, "plugin-mount", Some("/dev/null")).expect("parse should succeed");
|
set_argument(&mut config, "plugin-mount", Some("/dev/null")).expect("parse should succeed");
|
||||||
assert_eq!(config.plugin_mounts[0].dst, PathBuf::from("/dev/null"));
|
assert_eq!(config.plugin_mounts[0].dst, PathBuf::from("/dev/null"));
|
||||||
assert_eq!(config.plugin_mounts[0].writable, false);
|
assert!(!config.plugin_mounts[0].writable);
|
||||||
set_argument(&mut config, "plugin-mount", Some("/dev/null:/dev/zero"))
|
set_argument(&mut config, "plugin-mount", Some("/dev/null:/dev/zero"))
|
||||||
.expect("parse should succeed");
|
.expect("parse should succeed");
|
||||||
assert_eq!(config.plugin_mounts[1].dst, PathBuf::from("/dev/zero"));
|
assert_eq!(config.plugin_mounts[1].dst, PathBuf::from("/dev/zero"));
|
||||||
assert_eq!(config.plugin_mounts[1].writable, false);
|
assert!(!config.plugin_mounts[1].writable);
|
||||||
set_argument(&mut config, "plugin-mount", Some("/dev/null::true"))
|
set_argument(&mut config, "plugin-mount", Some("/dev/null::true"))
|
||||||
.expect("parse should succeed");
|
.expect("parse should succeed");
|
||||||
assert_eq!(config.plugin_mounts[2].dst, PathBuf::from("/dev/null"));
|
assert_eq!(config.plugin_mounts[2].dst, PathBuf::from("/dev/null"));
|
||||||
assert_eq!(config.plugin_mounts[2].writable, true);
|
assert!(config.plugin_mounts[2].writable);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
Loading…
Reference in a new issue