1 /*
2 * Copyright (C) 2023 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #include "com_android_aconfig_test.h"
18 #include "gtest/gtest.h"
19
20 using namespace com::android::aconfig::test;
21
TEST(AconfigTest,TestDisabledRwExportedFlag)22 TEST(AconfigTest, TestDisabledRwExportedFlag) {
23 ASSERT_FALSE(com_android_aconfig_test_disabled_rw_exported());
24 ASSERT_FALSE(provider_->disabled_rw_exported());
25 ASSERT_FALSE(disabled_rw_exported());
26 }
27
TEST(AconfigTest,TestEnabledFixedRoExportedFlag)28 TEST(AconfigTest, TestEnabledFixedRoExportedFlag) {
29 // TODO: change to assertTrue(enabledFixedRoExported()) when the build supports reading tests/*.values
30 ASSERT_FALSE(com_android_aconfig_test_enabled_fixed_ro_exported());
31 ASSERT_FALSE(provider_->enabled_fixed_ro_exported());
32 ASSERT_FALSE(enabled_fixed_ro_exported());
33 }
34
TEST(AconfigTest,TestEnabledRoExportedFlag)35 TEST(AconfigTest, TestEnabledRoExportedFlag) {
36 // TODO: change to assertTrue(enabledRoExported()) when the build supports reading tests/*.values
37 ASSERT_FALSE(com_android_aconfig_test_enabled_ro_exported());
38 ASSERT_FALSE(provider_->enabled_ro_exported());
39 ASSERT_FALSE(enabled_ro_exported());
40 }
41
main(int argc,char ** argv)42 int main(int argc, char** argv) {
43 ::testing::InitGoogleTest(&argc, argv);
44 return RUN_ALL_TESTS();
45 }