Home
last modified time | relevance | path

Searched refs:calculateScore (Results 1 – 7 of 7) sorted by relevance

/packages/modules/ExtServices/tests/src/android/ext/services/autofill/
DEditDistanceScorerTest.java18 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 …]
DExactMatchTest.java19 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 …]
DCreditCardMatcherTest.java21 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/
DAutofillFieldClassificationServiceImpl.java86 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()
DExactMatch.java39 static float calculateScore(@Nullable AutofillValue actualValue, in calculateScore() method in ExactMatch
DCreditCardMatcher.java70 static float calculateScore(@Nullable AutofillValue actualValue, in calculateScore() method in CreditCardMatcher
DEditDistanceScorer.java37 static float calculateScore(@Nullable AutofillValue actualValue, in calculateScore() method in EditDistanceScorer