diff options
author | Adam Lesinski <adamlesinski@google.com> | 2015-05-14 14:25:36 -0700 |
---|---|---|
committer | Adam Lesinski <adamlesinski@google.com> | 2015-05-15 15:10:58 -0700 |
commit | 2738c96d998dedfae5b4670d588d0cd299c4ca0f (patch) | |
tree | 76b8571676d42a9c0b3bfa00f1937eebf2c05698 /tools/aapt/tests | |
parent | 038959e851603500eb39b52fef33cbe75dbd73e3 (diff) | |
download | frameworks_base-2738c96d998dedfae5b4670d588d0cd299c4ca0f.zip frameworks_base-2738c96d998dedfae5b4670d588d0cd299c4ca0f.tar.gz frameworks_base-2738c96d998dedfae5b4670d588d0cd299c4ca0f.tar.bz2 |
Add -round and -notround qualifier to android runtime/aapt
The round qualifier denotes a device with a screen shape that
is round. The qualifier shows up after the 'long/notlong' qualifier
and before the orientation 'port/land/square' qualifiers.
Change-Id: I3044258b2703a9165694b79725bade770fa6cea1
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()); +} |