Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/spellcheck-transposition.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 /* PR other/69968. */ | |
2 | |
3 struct { | |
4 int coordx, coordy, coordz; | |
5 int coordx1, coordy1, coordz1; | |
6 } c; | |
7 | |
8 /* Consider the misspelling "coorzd1". | |
9 | |
10 With Levenshtein distance, the misspelling has an edit distance of 2 | |
11 to all 6 of the fields (e.g. via a deletion and a substitution for the | |
12 first three, and via deletion and insertion for the second three). | |
13 | |
14 With Damerau-Levenshtein, the misspelling has an edit distance of 1 | |
15 via transposition to "coordz1", and 2 to the other fields. */ | |
16 | |
17 void foo (void) | |
18 { | |
19 c.coorzd1 = c.coordy; /* { dg-error "has no member named 'coorzd1'; did you mean 'coordz1'" } */ | |
20 } |