Files
build/tools/aconfig/tests/aconfig_test_mode_test.rs
Mårten Kongstad 0b2a2a8c19 aconfig: adjust integration tests to correctly set flag values
With the introduction of a root release config, the
com.android.aconfig.test flags now have their values correctly assigned.
Update the integration tests accordingly.

Bug: 317178122
Test: atest :all
Merged-In: I1acdf9442a465f20f71bcda9b15eb69058aa4b3a
Change-Id: I1acdf9442a465f20f71bcda9b15eb69058aa4b3a
2023-12-21 09:00:48 +01:00

24 lines
983 B
Rust

#[cfg(not(feature = "cargo"))]
#[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());
aconfig_test_rust_library::set_disabled_ro(true);
assert!(aconfig_test_rust_library::disabled_ro());
aconfig_test_rust_library::set_disabled_rw(true);
assert!(aconfig_test_rust_library::disabled_rw());
aconfig_test_rust_library::set_enabled_ro(false);
assert!(!aconfig_test_rust_library::enabled_ro());
aconfig_test_rust_library::set_enabled_rw(false);
assert!(!aconfig_test_rust_library::enabled_rw());
aconfig_test_rust_library::reset_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());
}