/packages/modules/ExtServices/tests/src/android/ext/services/autofill/ |
D | EditDistanceScorerTest.java | 18 import static android.ext.services.autofill.EditDistanceScorer.calculateScore; 31 assertFloat(calculateScore(null, "D'OH!", null), 0); in testCalculateScore_nullValue() 36 assertFloat(calculateScore(AutofillValue.forToggle(true), "D'OH!", null), 0); in testCalculateScore_nonTextValue() 41 assertFloat(calculateScore(AutofillValue.forText("D'OH!"), null, null), 0); in testCalculateScore_nullUserData() 46 assertFloat(calculateScore(AutofillValue.forText("D'OH!"), "D'OH!", null), 1); in testCalculateScore_fullMatch() 47 assertFloat(calculateScore(AutofillValue.forText(""), "", null), 1); in testCalculateScore_fullMatch() 52 assertFloat(calculateScore(AutofillValue.forText("D'OH!"), "D'oH!", null), 1); in testCalculateScore_fullMatchMixedCase() 57 assertFloat(calculateScore(AutofillValue.forText("X"), "Xy", null), 0.50F); in testCalculateScore_mismatchDifferentSizes() 58 assertFloat(calculateScore(AutofillValue.forText("Xy"), "X", null), 0.50F); in testCalculateScore_mismatchDifferentSizes() 59 assertFloat(calculateScore(AutofillValue.forText("One"), "MoreThanOne", null), 0.27F); in testCalculateScore_mismatchDifferentSizes() [all …]
|
D | ExactMatchTest.java | 19 import static android.ext.services.autofill.ExactMatch.calculateScore; 40 assertFloat(calculateScore(null, "TEST", null), 0); in testCalculateScore_nullValue() 45 assertFloat(calculateScore(AutofillValue.forToggle(true), "TEST", null), 0); in testCalculateScore_nonTextValue() 50 assertFloat(calculateScore(AutofillValue.forText("TEST"), null, null), 0); in testCalculateScore_nullUserData() 56 assertFloat(calculateScore(AutofillValue.forText("TEST"), "1234 test", last4), 1); in testCalculateScore_succeedMatchMixedCases_last4() 57 assertFloat(calculateScore(AutofillValue.forText("test"), "1234 TEST", last4), 1); in testCalculateScore_succeedMatchMixedCases_last4() 63 assertFloat(calculateScore(AutofillValue.forText("TEST"), "TEST1", last4), 0); in testCalculateScore_mismatchDifferentSizes_last4() 64 assertFloat(calculateScore(AutofillValue.forText(""), "TEST", last4), 0); in testCalculateScore_mismatchDifferentSizes_last4() 65 assertFloat(calculateScore(AutofillValue.forText("TEST"), "", last4), 0); in testCalculateScore_mismatchDifferentSizes_last4() 71 assertFloat(calculateScore(AutofillValue.forText("1234 1234 1234 1234"), in testCalculateScore_match() [all …]
|
D | CreditCardMatcherTest.java | 21 import static android.ext.services.autofill.CreditCardMatcher.calculateScore; 36 assertFloat(calculateScore(AutofillValue.forText("5678"), "1234123412345678", in testCalculateScore_ForCreditCard() 38 assertFloat(calculateScore(AutofillValue.forText("5678"), "12341234125678", in testCalculateScore_ForCreditCard() 40 assertFloat(calculateScore(AutofillValue.forText("1234"), "1234123412341234", in testCalculateScore_ForCreditCard() 42 assertFloat(calculateScore(AutofillValue.forText("1234"), "1234123412345678", in testCalculateScore_ForCreditCard() 44 assertFloat(calculateScore(AutofillValue.forText("1234"), "12341234", in testCalculateScore_ForCreditCard() 46 assertFloat(calculateScore(AutofillValue.forText("1234"), "12341234123412341234", in testCalculateScore_ForCreditCard() 57 assertThrows(IllegalArgumentException.class, () -> calculateScore( in testCalculateScore_BadBundle() 63 assertThrows(IllegalArgumentException.class, () -> calculateScore( in testCalculateScore_BadBundle() 69 assertThrows(IllegalArgumentException.class, () -> calculateScore( in testCalculateScore_BadBundle() [all …]
|
/packages/modules/ExtServices/src/android/ext/services/autofill/ |
D | AutofillFieldClassificationServiceImpl.java | 86 scores[i][j] = EditDistanceScorer.calculateScore(actualValues.get(i), in calculateScores() 89 scores[i][j] = ExactMatch.calculateScore(actualValues.get(i), in calculateScores() 92 scores[i][j] = CreditCardMatcher.calculateScore(actualValues.get(i), in calculateScores()
|
D | ExactMatch.java | 39 static float calculateScore(@Nullable AutofillValue actualValue, in calculateScore() method in ExactMatch
|
D | CreditCardMatcher.java | 70 static float calculateScore(@Nullable AutofillValue actualValue, in calculateScore() method in CreditCardMatcher
|
D | EditDistanceScorer.java | 37 static float calculateScore(@Nullable AutofillValue actualValue, in calculateScore() method in EditDistanceScorer
|