xref: /aosp_15_r20/external/tink/cc/core/partial_key_access_token_test.cc (revision e7b1675dde1b92d52ec075b0a92829627f2c52a5)
1 // Copyright 2022 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //      http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 //
15 ////////////////////////////////////////////////////////////////////////////////
16 
17 #include <utility>
18 
19 #include "tink/partial_key_access_token.h"
20 
21 #include "gmock/gmock.h"
22 #include "gtest/gtest.h"
23 #include "absl/base/attributes.h"
24 #include "tink/partial_key_access.h"
25 
26 namespace crypto {
27 namespace tink {
28 namespace {
29 
TEST(PartialKeyAccessTokenTest,CopyConstructor)30 TEST(PartialKeyAccessTokenTest, CopyConstructor) {
31   PartialKeyAccessToken token = GetPartialKeyAccess();
32   PartialKeyAccessToken copy ABSL_ATTRIBUTE_UNUSED(token);
33 }
34 
TEST(PartialKeyAccessTokenTest,CopyAssignment)35 TEST(PartialKeyAccessTokenTest, CopyAssignment) {
36   PartialKeyAccessToken token = GetPartialKeyAccess();
37   PartialKeyAccessToken copy ABSL_ATTRIBUTE_UNUSED = token;
38 }
39 
TEST(PartialKeyAccessTokenTest,MoveConstructor)40 TEST(PartialKeyAccessTokenTest, MoveConstructor) {
41   PartialKeyAccessToken token = GetPartialKeyAccess();
42   PartialKeyAccessToken move ABSL_ATTRIBUTE_UNUSED(std::move(token));
43 }
44 
TEST(PartialKeyAccessTokenTest,MoveAssignment)45 TEST(PartialKeyAccessTokenTest, MoveAssignment) {
46   PartialKeyAccessToken token = GetPartialKeyAccess();
47   PartialKeyAccessToken move ABSL_ATTRIBUTE_UNUSED = std::move(token);
48 }
49 
50 }  // namespace
51 }  // namespace tink
52 }  // namespace crypto
53