diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2019-07-30 03:11:52 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2019-07-30 03:11:52 +0000 |
commit | 8d3e05158aa84e73025f2598e09ffdfe2e844156 (patch) | |
tree | ce05d29866554c88501f254be8accb44018f08fa | |
parent | 3d680407311f214514d2de06fd042f5765b9ff65 (diff) | |
parent | 6291841e96b7542582445902c3ef61d2cee005a6 (diff) | |
download | system-test-harness-8d3e05158aa84e73025f2598e09ffdfe2e844156.tar.gz |
Snap for 5764972 from 6291841e96b7542582445902c3ef61d2cee005a6 to qt-c2f2-release
Change-Id: Ibb08804a2a9cc91cd3fdac69ee5e3d554789998d
-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); } } |