On 06/14/2016 09:15 AM, David Malcolm wrote:
The next patch in the kit reimplements find_closest_string and
find_closest_identifier, so it seems prudent to add some more
test coverage for these. This patch also adds some more test
coverage for levenshtein_distance itself.
Successfully bootstrapped®rtested in combination with the rest of
the kit on x86_64-pc-linux-gnu
Successful -fself-test of stage1 on powerpc-ibm-aix7.1.3.0 of
just this patch (on top of patch 1).
OK for trunk if it passes individual bootstrap®rtest?
gcc/ChangeLog:
* selftest-run-tests.c (selftest::run_tests): Call
selftest::spellcheck_tree_c_tests.
* selftest.h (selftest::spellcheck_tree_c_tests): New decl.
* spellcheck-tree.c: Include selftest.h and stringpool.h.
(selftest::test_find_closest_identifier): New function.
(selftest::spellcheck_tree_c_tests): New function.
* spellcheck.c (selftest::test_find_closest_string): Verify that
the order of the vec does not affect the results for this case.
(selftest::test_data): New array.
(selftest::test_metric_conditions): New function.
(selftest::spellcheck_c_tests): Add a test of case-comparison.
Call selftest::test_metric_conditions.
OK.
jeff