diff options
author | Garret Kelly <gdk@google.com> | 2019-07-29 17:36:31 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-07-29 17:36:31 -0700 |
commit | 493cc0cbfbad9dfeef604917bd39884565954c67 (patch) | |
tree | ce05d29866554c88501f254be8accb44018f08fa | |
parent | e711c5bd90092c1c2caf25132cb0f94c8d64f562 (diff) | |
parent | 6291841e96b7542582445902c3ef61d2cee005a6 (diff) | |
download | system-test-harness-493cc0cbfbad9dfeef604917bd39884565954c67.tar.gz |
Merge remote-tracking branch 'goog/upstream-master' into MP-P19-02
am: 6291841e96
Change-Id: Ia37aa40bbb663e22f1d7c37373ebefac5cfa7dd6
-rw-r--r-- | src/faceauth_tests.cc | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/src/faceauth_tests.cc b/src/faceauth_tests.cc index 629a57d..41aefcc 100644 --- a/src/faceauth_tests.cc +++ b/src/faceauth_tests.cc @@ -1138,8 +1138,7 @@ TEST_F(FaceAuthTest, ExhaustiveFeatureTest) { } } -static void FullMatchMismatchTest(uint32_t profile_1, uint32_t profile_2, - uint32_t slot_1, uint32_t slot_2) { +static void FullMatchMismatchTest(uint32_t profile_1, uint32_t profile_2) { User user1(EMBEDDING_VECTOR_1); user1.SetEmbeddingVersion(1); @@ -1148,17 +1147,11 @@ static void FullMatchMismatchTest(uint32_t profile_1, uint32_t profile_2, for (uint32_t i = 0; i < 20; ++i) { Result result; - if (i == slot_1) - result = user1.SetEmbeddingBase(EMBEDDING_VECTOR_1).Enroll(profile_1); - else - result = user1.SetEmbeddingBase(EMBEDDING_VECTOR_NULL).Enroll(profile_1); + result = user1.SetEmbeddingBase(EMBEDDING_VECTOR_1).Enroll(profile_1); EXPECT_REQ(result, Result(FACEAUTH_SUCCESS).SetChallenge(user1.GetAuthID())); - if (i == slot_2) - result = user2.SetEmbeddingBase(EMBEDDING_VECTOR_2).Enroll(profile_2); - else - result = user2.SetEmbeddingBase(EMBEDDING_VECTOR_NULL).Enroll(profile_2); + result = user2.SetEmbeddingBase(EMBEDDING_VECTOR_2).Enroll(profile_2); EXPECT_REQ(result, Result(FACEAUTH_SUCCESS).SetChallenge(user2.GetAuthID())); } @@ -1177,19 +1170,9 @@ static void FullMatchMismatchTest(uint32_t profile_1, uint32_t profile_2, } TEST_F(FaceAuthTest, ExhaustiveMatchMismatchTest) { - FullMatchMismatchTest(PROFILE_1, PROFILE_6, 0, 19); - FullMatchMismatchTest(PROFILE_2, PROFILE_5, 1, 18); - FullMatchMismatchTest(PROFILE_3, PROFILE_4, 2, 17); - SetUp(); - FullMatchMismatchTest(PROFILE_2, PROFILE_4, 3, 16); - FullMatchMismatchTest(PROFILE_1, PROFILE_5, 4, 15); - FullMatchMismatchTest(PROFILE_3, PROFILE_6, 5, 14); - SetUp(); - FullMatchMismatchTest(PROFILE_3, PROFILE_5, 6, 13); - FullMatchMismatchTest(PROFILE_1, PROFILE_4, 7, 12); - FullMatchMismatchTest(PROFILE_2, PROFILE_6, 8, 11); - SetUp(); - FullMatchMismatchTest(PROFILE_3, PROFILE_6, 9, 10); + FullMatchMismatchTest(PROFILE_1, PROFILE_6); + FullMatchMismatchTest(PROFILE_2, PROFILE_5); + FullMatchMismatchTest(PROFILE_3, PROFILE_4); } } |