Added cross-type resources tests.

E.g. <item type="integer" name="test">TEST</item> or <item type="string" name="test">#ffcc00</item> - they must be decoded as <item />.
This commit is contained in:
Ryszard Wiśniewski 2011-05-02 03:41:08 +02:00
parent e4acfb34a2
commit edaa2e8163
4 changed files with 20 additions and 0 deletions

View File

@ -67,6 +67,13 @@ public class BuildAndDecodeTest {
compareValuesFiles("values-mcc002/strings.xml");
}
@Test
public void crossTypeTest() throws BrutException {
compareValuesFiles("values-mcc003/strings.xml");
compareValuesFiles("values-mcc003/integers.xml");
compareValuesFiles("values-mcc003/bools.xml");
}
@Test
public void layout1Test() throws BrutException {
compareXmlFiles("res/layout/layout1.xml");

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<item type="bool" name="test_crossType_str2bool">TEST</item>
</resources>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<item type="integer" name="test_crossType_str2int">TEST</item>
</resources>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<item type="string" name="test_crossType_bool2str">true</item>
<item type="string" name="test_crossType_int2str">5</item>
</resources>