diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/com/android/dialer/database/SmartDialPrefixTest.java | 8 | ||||
-rw-r--r-- | tests/src/com/android/dialer/dialpad/SmartDialNameMatcherTest.java | 1 |
2 files changed, 4 insertions, 5 deletions
diff --git a/tests/src/com/android/dialer/database/SmartDialPrefixTest.java b/tests/src/com/android/dialer/database/SmartDialPrefixTest.java index 23bda7cb2..558be265b 100644 --- a/tests/src/com/android/dialer/database/SmartDialPrefixTest.java +++ b/tests/src/com/android/dialer/database/SmartDialPrefixTest.java @@ -31,13 +31,10 @@ import com.android.dialer.dialpad.SmartDialNameMatcher; import com.android.dialer.dialpad.SmartDialPrefix; import java.lang.Exception; -import java.lang.FindBugsSuppressWarnings; import java.lang.Override; import java.lang.String; import java.util.ArrayList; -import junit.framework.TestCase; - /** * To run this test, use the command: * adb shell am instrument -w -e class com.android.dialer.dialpad.SmartDialPrefixTest / @@ -80,6 +77,7 @@ public class SmartDialPrefixTest extends AndroidTestCase { assertTrue(SmartDialPrefix.isCountryNanp("vi")); } + @Override protected void setUp() { mTestHelper = DialerDatabaseHelper.getNewInstanceForTest(getContext()); } @@ -136,8 +134,8 @@ public class SmartDialPrefixTest extends AndroidTestCase { private ContactNumber constructNewContactWithDummyIds(MatrixCursor contactCursor, MatrixCursor nameCursor, String number, int id, String displayName) { - return constructNewContact(contactCursor, nameCursor, id, number, 0, "", displayName, 0, 0, - 0, 0, 0, 0, 0); + return constructNewContact(contactCursor, nameCursor, id, number, id, String.valueOf(id), + displayName, 0, 0, 0, 0, 0, 0, 0); } private ContactNumber constructNewContact(MatrixCursor contactCursor, MatrixCursor nameCursor, diff --git a/tests/src/com/android/dialer/dialpad/SmartDialNameMatcherTest.java b/tests/src/com/android/dialer/dialpad/SmartDialNameMatcherTest.java index 1e578eee7..c1365f5cf 100644 --- a/tests/src/com/android/dialer/dialpad/SmartDialNameMatcherTest.java +++ b/tests/src/com/android/dialer/dialpad/SmartDialNameMatcherTest.java @@ -198,6 +198,7 @@ public class SmartDialNameMatcherTest extends TestCase { } public void testMatches_NumberNANP() { + SmartDialPrefix.setUserInNanpRegion(true); // An 11 digit number prefixed with 1 should be matched by the 10 digit number, as well as // the 7 digit number (without area code) checkMatchesNumber("1-510-333-7596", "5103337596", true, true, 2, 14); |