Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Fix structured binding tests
Browse files Browse the repository at this point in the history
  • Loading branch information
miscco committed Mar 20, 2023
1 parent 5b6c3a0 commit 8692a89
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions testing/pair.cu
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct TestPairManipulation
// test copy from pair
p4.first = T(2);
p4.second = T(3);

P p5;
p5 = p4;
ASSERT_EQUAL(p4.first, p5.first);
Expand Down Expand Up @@ -217,7 +217,7 @@ using PairConstVolatileTypes =
unittest::type_list<thrust::pair<int, float>, thrust::pair<int, float> const,
thrust::pair<int, float> const volatile>;

template <typename Pair>
template <typename Pair>
struct TestPairTupleSize
{
void operator()()
Expand Down Expand Up @@ -295,8 +295,8 @@ void TestPairStructuredBindings(void)
const int a = 42;
const int b = 1337;
thrust::pair<int,int> p(a,b);
[a2, b2] = p;

auto [a2, b2] = p;
ASSERT_EQUAL(a, a2);
ASSERT_EQUAL(b, b2);
}
Expand Down
4 changes: 2 additions & 2 deletions testing/tuple.cu
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,8 @@ void TestTupleStructuredBindings(void)
const int b = 42;
const int c = 1337;
thrust::tuple<int,int,int> t(a,b,c);
[a2, b2, c2] = t;

auto [a2, b2, c2] = t;
ASSERT_EQUAL(a, a2);
ASSERT_EQUAL(b, b2);
ASSERT_EQUAL(c, c2);
Expand Down

0 comments on commit 8692a89

Please sign in to comment.