diff options
author | Randolf J <34705014+jun-sheaf@users.noreply.github.com> | 2022-10-05 22:51:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-05 22:51:24 +0200 |
commit | beaec233795725fea58fd88b2f9271aa7decabce (patch) | |
tree | 73a75125b0787d3b47f32ae29b079bec864b9102 /absl/container/internal/common_policy_traits_test.cc | |
parent | bf2bf60a3e29f159c8aa513d58cbe65f3f633bb6 (diff) | |
parent | 1fd600dc490db4db0ebf7bcc629d8914e828467e (diff) | |
download | abseil-beaec233795725fea58fd88b2f9271aa7decabce.tar.gz abseil-beaec233795725fea58fd88b2f9271aa7decabce.tar.bz2 abseil-beaec233795725fea58fd88b2f9271aa7decabce.zip |
Merge branch 'abseil:master' into patch-1
Diffstat (limited to 'absl/container/internal/common_policy_traits_test.cc')
-rw-r--r-- | absl/container/internal/common_policy_traits_test.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/absl/container/internal/common_policy_traits_test.cc b/absl/container/internal/common_policy_traits_test.cc index 768d870e..5eaa4aae 100644 --- a/absl/container/internal/common_policy_traits_test.cc +++ b/absl/container/internal/common_policy_traits_test.cc @@ -27,7 +27,7 @@ namespace container_internal { namespace { using ::testing::MockFunction; -using ::testing::Return; +using ::testing::AnyNumber; using ::testing::ReturnRef; using Slot = int; @@ -101,9 +101,10 @@ TEST_F(Test, element) { TEST_F(Test, without_transfer) { int b = 42; - EXPECT_CALL(element, Call(&b)).WillOnce(::testing::ReturnRef(b)); - EXPECT_CALL(construct, Call(&alloc, &a, b)); - EXPECT_CALL(destroy, Call(&alloc, &b)); + EXPECT_CALL(element, Call(&a)).Times(AnyNumber()).WillOnce(ReturnRef(a)); + EXPECT_CALL(element, Call(&b)).WillOnce(ReturnRef(b)); + EXPECT_CALL(construct, Call(&alloc, &a, b)).Times(AnyNumber()); + EXPECT_CALL(destroy, Call(&alloc, &b)).Times(AnyNumber()); common_policy_traits<PolicyWithoutOptionalOps>::transfer(&alloc, &a, &b); } |