X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=nucleus%2Flibrary%2Ftests_structures%2Ftest_hash_table.cpp;h=ca0d465fcf9b980617680b0a68e1739436b3f493;hb=c5b50cbfbbd4c4dcbd2d52ad78fa91febb70d9e5;hp=0fc446c2d1e8ff9630ee9ee8da8dc431b561b712;hpb=e2b2c974b9b441cfe65e9b3530807d13bd73fef0;p=feisty_meow.git diff --git a/nucleus/library/tests_structures/test_hash_table.cpp b/nucleus/library/tests_structures/test_hash_table.cpp index 0fc446c2..ca0d465f 100644 --- a/nucleus/library/tests_structures/test_hash_table.cpp +++ b/nucleus/library/tests_structures/test_hash_table.cpp @@ -247,7 +247,8 @@ bool test_hash_table::test_add() to_add->snacky_string = string_manipulation::make_random_name(); to_add->food_bar = random_id; outcome expected = common::IS_NEW; - if (_keys_in_use.member(random_id)) return common::EXISTING; + // make sure it doesn't exist already. + if (_keys_in_use.member(random_id)) return false; ASSERT_EQUAL(_the_table.add(random_id, to_add).value(), expected.value(), "add should give proper outcome based on expectation"); if (_keys_in_use.member(random_id)) @@ -520,3 +521,4 @@ return false; HOOPLE_MAIN(test_hash_table, ) +