aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJi Soo Shin <jisshin@google.com>2019-07-12 19:10:33 -0700
committerJi Soo Shin <jisshin@google.com>2019-07-12 19:13:20 -0700
commitfba70a82c14a50ef80c8901b9e5909a5f9b42016 (patch)
tree93eb812bfe5a08e9a383a842b7b4087834016675
parentd08f7fb87d2d3a1afb5012b8f9f6ad82d9a95822 (diff)
downloadsystem-test-harness-fba70a82c14a50ef80c8901b9e5909a5f9b42016.tar.gz
faceauth_tests: fix tests to have valid NULL embeddings
Bug: 135763682 Test: bazel Change-Id: I53793c208eb0c619f374dc9161b429c89705e168 Signed-off-by: Ji Soo Shin <jisshin@google.com>
-rw-r--r--src/faceauth_tests.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/faceauth_tests.cc b/src/faceauth_tests.cc
index 003aa61..629a57d 100644
--- a/src/faceauth_tests.cc
+++ b/src/faceauth_tests.cc
@@ -16,7 +16,7 @@ using std::unique_ptr;
namespace {
-const vector<uint8_t> EMBEDDING_VECTOR_NULL(1, 128);
+vector<uint8_t> EMBEDDING_VECTOR_NULL(128, 0);
const vector<uint8_t> EMBEDDING_VECTOR_1(64, 16);
const vector<uint8_t> EMBEDDING_VECTOR_2(64, (uint8_t)-16);
@@ -50,6 +50,9 @@ void FaceAuthTest::SetUpTestCase() {
client = nugget_tools::MakeNuggetClient();
client->Open();
EXPECT_TRUE(client->IsOpen()) << "Unable to connect";
+
+ /* We need any embedding vector to have magnitude of 128 */
+ EMBEDDING_VECTOR_NULL[127] = 128;
DisengageGlobalLockout();
}