diff options
Diffstat (limited to 'tools/aapt/tests')
-rw-r--r-- | tools/aapt/tests/AaptConfig_test.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/aapt/tests/AaptConfig_test.cpp b/tools/aapt/tests/AaptConfig_test.cpp index 7618974..8bb38ba 100644 --- a/tools/aapt/tests/AaptConfig_test.cpp +++ b/tools/aapt/tests/AaptConfig_test.cpp @@ -19,6 +19,7 @@ #include "AaptConfig.h" #include "ConfigDescription.h" +#include "SdkConstants.h" #include "TestHelper.h" using android::String8; @@ -82,3 +83,18 @@ TEST(AaptConfigTest, TestParsingOfCarAttribute) { EXPECT_TRUE(TestParse("car", &config)); EXPECT_EQ(android::ResTable_config::UI_MODE_TYPE_CAR, config.uiMode); } + +TEST(AaptConfigTest, TestParsingRoundQualifier) { + ConfigDescription config; + EXPECT_TRUE(TestParse("round", &config)); + EXPECT_EQ(android::ResTable_config::SCREENROUND_YES, + config.screenLayout2 & android::ResTable_config::MASK_SCREENROUND); + EXPECT_EQ(SDK_MNC, config.sdkVersion); + EXPECT_EQ(String8("round-v23"), config.toString()); + + EXPECT_TRUE(TestParse("notround", &config)); + EXPECT_EQ(android::ResTable_config::SCREENROUND_NO, + config.screenLayout2 & android::ResTable_config::MASK_SCREENROUND); + EXPECT_EQ(SDK_MNC, config.sdkVersion); + EXPECT_EQ(String8("notround-v23"), config.toString()); +} |