Merge "Add test for clap::IntoApp."

This commit is contained in:
Treehugger Robot 2022-12-01 10:18:22 +00:00 committed by Gerrit Code Review
commit 99585d4d5e
2 changed files with 25 additions and 2 deletions

View File

@ -2,8 +2,8 @@ package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
rust_binary {
name: "vm",
rust_defaults {
name: "vm.defaults",
crate_name: "vm",
srcs: ["src/main.rs"],
edition: "2021",
@ -25,11 +25,23 @@ rust_binary {
"libvmclient",
"libzip",
],
}
rust_binary {
name: "vm",
defaults: ["vm.defaults"],
apex_available: [
"com.android.virt",
],
}
rust_test {
name: "vm.test",
defaults: ["vm.defaults"],
test_suites: ["general-tests"],
compile_multilib: "first",
}
sh_binary_host {
name: "vm_shell",
src: "vm_shell.sh",

View File

@ -393,3 +393,14 @@ fn command_info() -> Result<(), Error> {
Ok(())
}
#[cfg(test)]
mod tests {
use super::*;
use clap::IntoApp;
#[test]
fn verify_app() {
Opt::into_app().debug_assert();
}
}