This commit is contained in:
parent
06078006f6
commit
7cdf807337
3 changed files with 22 additions and 1 deletions
12
test/test.cc
12
test/test.cc
|
|
@ -114,6 +114,17 @@ void test_build_list() {
|
|||
}
|
||||
}
|
||||
|
||||
void test_misplaced_fn_empty() {
|
||||
std::vector<std::string> candidates = {"apple", "ample", "angle"};
|
||||
std::string wrong = "x";
|
||||
IndexMap green{{1, 'p'}};
|
||||
IndexMap yellow;
|
||||
do_filter(candidates, wrong, green, yellow);
|
||||
assert(candidates.size() == 1);
|
||||
assert(candidates[0] == "apple");
|
||||
std::cout << "test_misplaced_fn_empty passed.\n";
|
||||
}
|
||||
|
||||
int main() {
|
||||
test_read_candidates();
|
||||
test_contains_any_of();
|
||||
|
|
@ -122,6 +133,7 @@ int main() {
|
|||
test_wrong_fn();
|
||||
test_correct_fn();
|
||||
test_misplaced_fn();
|
||||
test_misplaced_fn_empty();
|
||||
test_do_filter();
|
||||
test_build_list();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue