diff options
author | Dominik Madarasz <zaklaus@outlook.com> | 2020-05-16 10:58:29 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-16 11:01:14 +0200 |
commit | 4e27c58be70d9ddb26c00f62ca982cf398ae70ba (patch) | |
tree | 2a8532ca341a9f24b37471c03eab73df5a9ea41f /AK | |
parent | 76bcd284f9dddc93f975cccabae9dc4c040c5a53 (diff) | |
download | serenity-4e27c58be70d9ddb26c00f62ca982cf398ae70ba.zip |
Build: FreeBSD support
Diffstat (limited to 'AK')
-rw-r--r-- | AK/Tests/TestRefPtr.cpp | 11 | ||||
-rw-r--r-- | AK/Tests/TestWeakPtr.cpp | 9 |
2 files changed, 19 insertions, 1 deletions
diff --git a/AK/Tests/TestRefPtr.cpp b/AK/Tests/TestRefPtr.cpp index cf03da32c2..8b5d02dc8c 100644 --- a/AK/Tests/TestRefPtr.cpp +++ b/AK/Tests/TestRefPtr.cpp @@ -79,7 +79,16 @@ TEST_CASE(assign_copy_self) { RefPtr<Object> object = adopt(*new Object); EXPECT_EQ(object->ref_count(), 1); - object = object; + + #ifdef __clang__ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wself-assign-overloaded" + #endif + object = object; + #ifdef __clang__ + #pragma clang diagnostic pop + #endif + EXPECT_EQ(object->ref_count(), 1); } diff --git a/AK/Tests/TestWeakPtr.cpp b/AK/Tests/TestWeakPtr.cpp index d272c1fc61..0d724e5e90 100644 --- a/AK/Tests/TestWeakPtr.cpp +++ b/AK/Tests/TestWeakPtr.cpp @@ -29,6 +29,11 @@ #include <AK/Weakable.h> #include <AK/WeakPtr.h> +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunused-private-field" +#endif + class SimpleWeakable : public Weakable<SimpleWeakable> { public: SimpleWeakable() {} @@ -37,6 +42,10 @@ private: int m_member { 123 }; }; +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + TEST_CASE(basic_weak) { WeakPtr<SimpleWeakable> weak1; |