diff options
author | asynts <asynts@gmail.com> | 2020-08-21 18:31:48 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-22 10:46:56 +0200 |
commit | 39b464dcfd71e31f0340e73cb377d58a596ca27e (patch) | |
tree | 912eabac38b25bd12983d7dac09217e2c477358b /AK | |
parent | b306f240a4a3ef4a8f5797734457572e0026cc0c (diff) | |
download | serenity-39b464dcfd71e31f0340e73cb377d58a596ca27e.zip |
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)
Diffstat (limited to 'AK')
-rw-r--r-- | AK/Tests/TestHashMap.cpp | 19 |
1 files changed, 4 insertions, 15 deletions
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 <AK/TestSuite.h> -#include <AK/String.h> #include <AK/HashMap.h> +#include <AK/String.h> 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<int, Object>* m_map; - }; - HashMap<int, Object> map; - map.set(0, { &map }); - map.clear(); -} - -TEST_CASE(hashmap_of_nonnullownptr_get) -{ - struct Object { - Object(const String& s) : string(s) {} String string; }; |