Skip to content

Commit

Permalink
Tests: Use AK_MAKE_DEFAULT_MOVABLE to avoid mistakes in default impls
Browse files Browse the repository at this point in the history
  • Loading branch information
BenWiederhake authored and AtkinsSJ committed Jun 18, 2023
1 parent 8ae60dd commit 2b2e0a4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions Tests/AK/TestQuickSort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ TEST_CASE(sorts_without_copy)
{
struct NoCopy {
AK_MAKE_NONCOPYABLE(NoCopy);
AK_MAKE_DEFAULT_MOVABLE(NoCopy);

public:
NoCopy() = default;
NoCopy(NoCopy&&) = default;

NoCopy& operator=(NoCopy&&) = default;

int value { 0 };
};
Expand Down
2 changes: 1 addition & 1 deletion Tests/AK/TestTuple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ TEST_CASE(no_copy)
{
struct NoCopy {
AK_MAKE_NONCOPYABLE(NoCopy);
AK_MAKE_DEFAULT_MOVABLE(NoCopy);

public:
NoCopy(NoCopy&&) = default;
NoCopy() = default;
};

Expand Down
2 changes: 1 addition & 1 deletion Tests/AK/TestVariant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ TEST_CASE(move_moves)
{
struct NoCopy {
AK_MAKE_NONCOPYABLE(NoCopy);
AK_MAKE_DEFAULT_MOVABLE(NoCopy);

public:
NoCopy() = default;
NoCopy(NoCopy&&) = default;
};

Variant<NoCopy, int> first_variant { 42 };
Expand Down

0 comments on commit 2b2e0a4

Please sign in to comment.