tests for edit distance