Tests: Use AK_MAKE_DEFAULT_MOVABLE to avoid mistakes in default impls

This commit is contained in:
Ben Wiederhake 2023-06-16 16:13:41 +02:00 committed by Sam Atkins
parent 8ae60dd234
commit 2b2e0a4c5a
Notes: sideshowbarker 2024-07-17 07:43:05 +09:00
3 changed files with 3 additions and 5 deletions

View file

@ -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 };
};

View file

@ -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;
};

View file

@ -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 };