diff --git a/tests/hash_table_test.c b/tests/hash_table_test.c index 9d9237d79..2a867ba3f 100644 --- a/tests/hash_table_test.c +++ b/tests/hash_table_test.c @@ -1084,7 +1084,7 @@ static int s_test_hash_churn_fn(struct aws_allocator *allocator, void *ctx) { int was_present; err_code = aws_hash_table_remove(&hash_table, e->key, NULL, &was_present); ASSERT_SUCCESS(err_code, "Unexpected failure removing element"); - if (i == 0 && entries[i - 1].key == e->key && entries[i - 1].is_removed) { + if (i != 0 && entries[i - 1].key == e->key && entries[i - 1].is_removed) { ASSERT_INT_EQUALS(0, was_present, "Expected item to be missing"); } else { ASSERT_INT_EQUALS(1, was_present, "Expected item to be present");