This commit adds exported mode to rust codegen. When the codegen mode is exported 1. only flags with exported: true will be generated 2. the generated getter should be in a read_write format and with default value as false, regardless the original permission and state of the flag This commit adds integration test for rust codegen exported mode. Bug: 316357104 Test: atest aconfig.test aconfig.test_mode.test.rust aconfig.exported_mode.test.rust Change-Id: Ib7dae666e13eb8898289b06d42a4f89326e175c4
8 lines
258 B
Rust
8 lines
258 B
Rust
#[cfg(not(feature = "cargo"))]
|
|
#[test]
|
|
fn test_flags() {
|
|
assert!(!aconfig_test_rust_library::disabled_rw_exported());
|
|
assert!(!aconfig_test_rust_library::enabled_fixed_ro_exported());
|
|
assert!(!aconfig_test_rust_library::enabled_ro_exported());
|
|
}
|