Merge "Add rust_test for aconfig" into main am: 908aba1147
Original change: https://android-review.googlesource.com/c/platform/build/+/2691266 Change-Id: Ie907e3200f9bafd130125eadd7819a979d9fa7ef Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -152,3 +152,19 @@ cc_test {
|
||||
"server_configurable_flags",
|
||||
],
|
||||
}
|
||||
|
||||
rust_aconfig_library {
|
||||
name: "libaconfig_test_rust_library",
|
||||
crate_name: "aconfig_test_rust_library",
|
||||
aconfig_declarations: "aconfig.test.flags",
|
||||
}
|
||||
|
||||
rust_test {
|
||||
name: "aconfig.test.rust",
|
||||
srcs: [
|
||||
"tests/aconfig_test.rs"
|
||||
],
|
||||
rustlibs: [
|
||||
"libaconfig_test_rust_library",
|
||||
],
|
||||
}
|
7
tools/aconfig/tests/aconfig_test.rs
Normal file
7
tools/aconfig/tests/aconfig_test.rs
Normal file
@@ -0,0 +1,7 @@
|
||||
#[test]
|
||||
fn test_flags() {
|
||||
assert!(!aconfig_test_rust_library::disabled_ro());
|
||||
assert!(!aconfig_test_rust_library::disabled_rw());
|
||||
assert!(aconfig_test_rust_library::enabled_ro());
|
||||
assert!(aconfig_test_rust_library::enabled_rw());
|
||||
}
|
Reference in New Issue
Block a user