mirror of
https://github.com/OpenMW/openmw.git
synced 2026-01-14 05:00:54 +00:00
Add another test
This commit is contained in:
parent
8349c09170
commit
3dec065dff
1 changed files with 4 additions and 0 deletions
|
|
@ -18,6 +18,10 @@ namespace MWGui
|
|||
{
|
||||
EXPECT_EQ(weightedSearch(std::string(100, 'x'), std::vector<std::string>{}), 1);
|
||||
}
|
||||
TEST(MWGuiWeightedSearchTests, weightedSearchShouldReturnTheSumOfAllPatternsWithAtLeastOneMatch)
|
||||
{
|
||||
EXPECT_EQ(weightedSearch(std::string("xyyzzz"), std::vector<std::string>{ "x", "y", "z" }), 3);
|
||||
}
|
||||
TEST(MWGuiWeightedSearchTests, generatePatternArrayShouldReturnEmptyArrayIfInputIsEmptyOrOnlySpaces)
|
||||
{
|
||||
EXPECT_THAT(generatePatternArray(std::string("")), testing::IsEmpty());
|
||||
|
|
|
|||
Loading…
Reference in a new issue