mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
Tests: Use AK_MAKE_DEFAULT_MOVABLE to avoid mistakes in default impls
This commit is contained in:
parent
8ae60dd234
commit
2b2e0a4c5a
Notes:
sideshowbarker
2024-07-17 07:43:05 +09:00
Author: https://github.com/BenWiederhake Commit: https://github.com/SerenityOS/serenity/commit/2b2e0a4c5a Pull-request: https://github.com/SerenityOS/serenity/pull/19422
3 changed files with 3 additions and 5 deletions
|
@ -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 };
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
@ -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 };
|
||||
|
|
Loading…
Reference in a new issue