The integration tests introduced in 906405f5c9
depend on libraries
auto-generated by running aconfig. This works fine for the Android build
system, but breaks `cargo t`.
Disable the tests when using `cargo t` for local development. Cargo can
be used for rapid local development, including running unit tests;
integration tests should be run using atest.
Bug: 298904077
Test: cargo t
Test: atest aconfig.test_mode.test.rust aconfig.prod_mode.test.rust
Change-Id: Ifcd374fa6efdc121cbfd4c4ac4fb43cf9cacc192
25 lines
1.0 KiB
Rust
25 lines
1.0 KiB
Rust
#[cfg(not(feature = "cargo"))]
|
|
#[test]
|
|
fn test_flags() {
|
|
assert!(!aconfig_test_rust_library::disabled_ro());
|
|
assert!(!aconfig_test_rust_library::disabled_rw());
|
|
// TODO: Fix template to not default both disabled and enabled to false
|
|
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(true);
|
|
assert!(aconfig_test_rust_library::enabled_ro());
|
|
aconfig_test_rust_library::set_enabled_rw(true);
|
|
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());
|
|
}
|