mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:27:45 +00:00
AK: Fix typo in the WeakPtr test. Behavior was actually correct.
Also remove an unused variable.
This commit is contained in:
parent
4e59300650
commit
31793b8f3a
1 changed files with 1 additions and 5 deletions
|
@ -3,10 +3,6 @@
|
||||||
#include <AK/Weakable.h>
|
#include <AK/Weakable.h>
|
||||||
#include <AK/WeakPtr.h>
|
#include <AK/WeakPtr.h>
|
||||||
|
|
||||||
namespace AK{
|
|
||||||
int g_weaklinks = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
class SimpleWeakable : public Weakable<SimpleWeakable> {
|
class SimpleWeakable : public Weakable<SimpleWeakable> {
|
||||||
public:
|
public:
|
||||||
SimpleWeakable() {}
|
SimpleWeakable() {}
|
||||||
|
@ -49,7 +45,7 @@ TEST_CASE(weakptr_move)
|
||||||
EXPECT_EQ(weak2.ptr(), &simple);
|
EXPECT_EQ(weak2.ptr(), &simple);
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPECT_EQ(weak2.is_null(), false);
|
EXPECT_EQ(weak2.is_null(), true);
|
||||||
|
|
||||||
fprintf(stderr, "ok\n");
|
fprintf(stderr, "ok\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue