From 35ea608c651cb478025c9fe96b41d77bac83bd87 Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Tue, 16 Nov 2021 13:51:05 +0000 Subject: tests/pwl/enchant_pwl_tests.cpp: add extra check to prevent a crash This should fix the test crash in #218 (though not the underlying bug!). --- tests/pwl/enchant_pwl_tests.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/pwl/enchant_pwl_tests.cpp b/tests/pwl/enchant_pwl_tests.cpp index 5dc1562..8625421 100644 --- a/tests/pwl/enchant_pwl_tests.cpp +++ b/tests/pwl/enchant_pwl_tests.cpp @@ -309,6 +309,7 @@ TEST_FIXTURE(EnchantPwl_TestFixture, AddWordsToDictionary(sNoiseWords); std::vector suggestions = GetSuggestionsFromWord("saskep"); + CHECK(suggestions.size() > 0); // FIXME: The string in the next line was originally "hasten", but the // test failed. Is this now correct? CHECK(suggestions[0] != "hastens"); -- cgit v1.2.1