diff options
author | Daisuke Miyakawa <dmiyakawa@google.com> | 2009-09-21 11:19:51 -0700 |
---|---|---|
committer | Daisuke Miyakawa <dmiyakawa@google.com> | 2009-09-21 12:30:34 -0700 |
commit | 4e3790e646bce315a1b34c9dc474eb8152c8eea2 (patch) | |
tree | 1b673e0acb2c2819d30a2f41b9046e4b2e9872dd /tests | |
parent | 0be993f8ef0078b9825a5ffe6add08a6786d8dac (diff) | |
download | ContactsProvider-4e3790e646bce315a1b34c9dc474eb8152c8eea2.tar.gz |
Fix test breakage as per Dmitri's report.
I'm not sure Contacts team is happy with this behavior: the result of comparation changes depending on
the config. But anyway, this fix should fix the problem...
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/com/android/providers/contacts/ContactsProvider2Test.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/src/com/android/providers/contacts/ContactsProvider2Test.java b/tests/src/com/android/providers/contacts/ContactsProvider2Test.java index 1d53728f..0e1ebff2 100644 --- a/tests/src/com/android/providers/contacts/ContactsProvider2Test.java +++ b/tests/src/com/android/providers/contacts/ContactsProvider2Test.java @@ -214,8 +214,16 @@ public class ContactsProvider2Test extends BaseContactsProvider2Test { values.put(PhoneLookup.SEND_TO_VOICEMAIL, 1); assertStoredValues(lookupUri1, values); + // The strict comparation, adopted in Donut, does not allow the behavior like + // "8004664411 == 4664411", while the loose comparation, which had been used in Cupcake + // and reverted back into the default in Eclair, allows it. Hmm... + final boolean useStrictComparation = + mContext.getResources().getBoolean( + com.android.internal.R.bool.config_use_strict_phone_number_comparation); + final int expectedResult = (useStrictComparation ? 0 : 1); + Uri lookupUri2 = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, "4664411"); - assertEquals(0, getCount(lookupUri2, null, null)); + assertEquals(expectedResult, getCount(lookupUri2, null, null)); } public void testPhoneUpdate() { |