Add setFlag and resetAll in FeatureFlags test mode
Add methods setFlag and resetAll in FeatureFlags in test mode. For the injection usecase, user will use the interface FeatureFlags in the code to control the flags. Add tests for test mode. Bug: 280833463 Test: Atest AconfigJavaHostTest --host Change-Id: Ib59ba35a9011a6400af42fc9c283d37193577997
This commit is contained in:
@@ -101,7 +101,7 @@ java_aconfig_library {
|
||||
android_test {
|
||||
name: "aconfig.test.java",
|
||||
srcs: [
|
||||
"tests/**/*.java",
|
||||
"tests/AconfigTest.java",
|
||||
],
|
||||
manifest: "tests/AndroidManifest.xml",
|
||||
certificate: "platform",
|
||||
@@ -113,6 +113,25 @@ android_test {
|
||||
test_suites: ["device-tests"],
|
||||
}
|
||||
|
||||
java_aconfig_library {
|
||||
name: "aconfig_host_test_java_library",
|
||||
aconfig_declarations: "aconfig.test.flags",
|
||||
host_supported: true,
|
||||
test: true,
|
||||
}
|
||||
|
||||
java_test_host {
|
||||
name: "AconfigJavaHostTest",
|
||||
srcs: [
|
||||
"tests/AconfigHostTest.java",
|
||||
],
|
||||
static_libs: [
|
||||
"aconfig_host_test_java_library",
|
||||
"junit",
|
||||
],
|
||||
test_suites: ["general-tests"],
|
||||
}
|
||||
|
||||
// integration tests: C++
|
||||
|
||||
cc_aconfig_library {
|
||||
|
Reference in New Issue
Block a user