summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnand Prasad <anprasad@nvidia.com>2016-01-07 17:37:58 -0800
committerDavid Riley <davidriley@google.com>2016-01-13 14:38:49 -0800
commit936d5baa28cdabee3590ec78d0552cffdc9fd8ca (patch)
tree9f68714c5b8de06c39bb90554faa1614d9d050ae
parent70a35b8b84dcae0fd80d538153370dcb58c19459 (diff)
downloadgatekeeper-936d5baa28cdabee3590ec78d0552cffdc9fd8ca.tar.gz
Fix Gatekeeper unit test
Change-Id: I13bec83902ef431254b6f9541db80573d7360c2d
-rw-r--r--tests/gatekeeper_device_test.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/gatekeeper_device_test.cpp b/tests/gatekeeper_device_test.cpp
index d2283ec..147bd07 100644
--- a/tests/gatekeeper_device_test.cpp
+++ b/tests/gatekeeper_device_test.cpp
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#include <endian.h>
#include <gtest/gtest.h>
#include <hardware/gatekeeper.h>
#include <gatekeeper/gatekeeper.h> // For password_handle_t
@@ -97,7 +98,7 @@ TEST_F(GateKeeperDeviceTest, EnrollAndVerify) {
hat = reinterpret_cast<hw_auth_token_t *>(auth_token);
ASSERT_EQ(HW_AUTH_TOKEN_VERSION, hat->version);
- ASSERT_EQ(HW_AUTH_PASSWORD, hat->authenticator_type);
+ ASSERT_EQ(htonl(HW_AUTH_PASSWORD), hat->authenticator_type);
}
TEST_F(GateKeeperDeviceTest, EnrollAndVerifyTimeout) {