diff options
author | Garret Kelly <gdk@google.com> | 2019-07-23 15:30:30 -0400 |
---|---|---|
committer | Garret Kelly <gdk@google.com> | 2019-07-23 15:47:21 -0400 |
commit | 6291841e96b7542582445902c3ef61d2cee005a6 (patch) | |
tree | ce05d29866554c88501f254be8accb44018f08fa | |
parent | da7a2cdecabe0440f8757531732e355a3cdb68ee (diff) | |
parent | 771e48e5fe0b0558cdbc25a7dbcf7098db4eee27 (diff) | |
download | system-test-harness-6291841e96b7542582445902c3ef61d2cee005a6.tar.gz |
Merge remote-tracking branch 'goog/upstream-master' into MP-P19-02
* goog/upstream-master:
fa: change to full slot match/mismatch
Bug: 137971073
Bug: 138231302
Test: release tests
Change-Id: I31997d73dc69f340cb3737e3567fed3d1c551e2e
-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); } } |