diff options
author | Bartosz Przydatek <przydatek@google.com> | 2017-08-31 17:52:12 +0200 |
---|---|---|
committer | Thai Duong <thaidn@google.com> | 2017-09-01 15:21:26 -0700 |
commit | cc8d6273ea1d635a22f313f6c58f7161320f2dd1 (patch) | |
tree | 259eb3a3a7459b702ab89931281ca4c3d55bb288 /cc/mac/mac_factory_test.cc | |
parent | 7dddc4e051d08b5935485660879649c5123deb06 (diff) | |
download | tink-cc8d6273ea1d635a22f313f6c58f7161320f2dd1.tar.gz |
Fixing style issues.
Change-Id: I4f928caa6fbd877d2169fee572ae5c0381460e0b
ORIGINAL_AUTHOR=Bartosz Przydatek <przydatek@google.com>
GitOrigin-RevId: cbcaf65319ea010372050ac9ddd6bbc8d7f82c91
Diffstat (limited to 'cc/mac/mac_factory_test.cc')
-rw-r--r-- | cc/mac/mac_factory_test.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cc/mac/mac_factory_test.cc b/cc/mac/mac_factory_test.cc index 67161f3a4..ca4c34902 100644 --- a/cc/mac/mac_factory_test.cc +++ b/cc/mac/mac_factory_test.cc @@ -37,6 +37,8 @@ using google::crypto::tink::Keyset; using google::crypto::tink::KeyStatusType; using google::crypto::tink::KeyTemplate; +namespace util = crypto::tink::util; + namespace crypto { namespace tink { namespace { @@ -49,7 +51,7 @@ TEST_F(MacFactoryTest, testBasic) { KeysetHandle keyset_handle(keyset); auto mac_result = MacFactory::GetPrimitive(keyset_handle); EXPECT_FALSE(mac_result.ok()); - EXPECT_EQ(crypto::tink::util::error::INVALID_ARGUMENT, mac_result.status().error_code()); + EXPECT_EQ(util::error::INVALID_ARGUMENT, mac_result.status().error_code()); EXPECT_PRED_FORMAT2(testing::IsSubstring, "at least one key", mac_result.status().error_message()); } @@ -105,18 +107,18 @@ TEST_F(MacFactoryTest, testPrimitive) { CryptoFormat::get_output_prefix(keyset.key(2)).ValueOrDie(); EXPECT_PRED_FORMAT2(testing::IsSubstring, prefix, mac_value); - crypto::tink::util::Status status = mac->VerifyMac(mac_value, data); + util::Status status = mac->VerifyMac(mac_value, data); EXPECT_TRUE(status.ok()) << status; status = mac->VerifyMac(mac_value, "bad data for mac"); EXPECT_FALSE(status.ok()); - EXPECT_EQ(crypto::tink::util::error::INVALID_ARGUMENT, status.error_code()); + EXPECT_EQ(util::error::INVALID_ARGUMENT, status.error_code()); EXPECT_PRED_FORMAT2(testing::IsSubstring, "verification failed", status.error_message()); status = mac->VerifyMac("some bad mac value", data); EXPECT_FALSE(status.ok()); - EXPECT_EQ(crypto::tink::util::error::INVALID_ARGUMENT, status.error_code()); + EXPECT_EQ(util::error::INVALID_ARGUMENT, status.error_code()); EXPECT_PRED_FORMAT2(testing::IsSubstring, "verification failed", status.error_message()); |