From 39b464dcfd71e31f0340e73cb377d58a596ca27e Mon Sep 17 00:00:00 2001 From: asynts Date: Fri, 21 Aug 2020 18:31:48 +0200 Subject: AK: Remove test case that doesn't test anything. Currently, there is no way to check that an assert fails. This test passes regardless of the assert. (AK/HashTable.h:93) --- AK/Tests/TestHashMap.cpp | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'AK/Tests') diff --git a/AK/Tests/TestHashMap.cpp b/AK/Tests/TestHashMap.cpp index e6ee902d84..fb8f483a0c 100644 --- a/AK/Tests/TestHashMap.cpp +++ b/AK/Tests/TestHashMap.cpp @@ -26,8 +26,8 @@ #include -#include #include +#include TEST_CASE(construct) { @@ -88,24 +88,13 @@ TEST_CASE(case_insensitive) EXPECT_EQ(casemap.size(), 1u); } -TEST_CASE(assert_on_iteration_during_clear) +TEST_CASE(hashmap_of_nonnullownptr_get) { struct Object { - ~Object() + Object(const String& s) + : string(s) { - m_map->begin(); } - HashMap* m_map; - }; - HashMap map; - map.set(0, { &map }); - map.clear(); -} - -TEST_CASE(hashmap_of_nonnullownptr_get) -{ - struct Object { - Object(const String& s) : string(s) {} String string; }; -- cgit v1.2.3