Remove multiple occurrence test from cpp

- This is superceded by a generic test in pmd-core
This commit is contained in:
Juan Martín Sotuyo Dodero 2024-04-18 00:54:29 -03:00
parent be902e61e1
commit e1ac7a13a2
2 changed files with 0 additions and 29 deletions

View File

@ -39,21 +39,4 @@ public class CppCpdTest {
});
}
}
@Test
void testMultipleExactMatches() throws Exception {
CPDConfiguration configuration = new CPDConfiguration();
configuration.setMinimumTileSize(40);
configuration.setOnlyRecognizeLanguage(CppLanguageModule.getInstance());
try (CpdAnalysis cpd = CpdAnalysis.create(configuration)) {
cpd.files().addFile(testdir.resolve("multipleExactMatches.c"));
cpd.performAnalysis(matches -> {
// There should only be 1 duplication, and it should be maximal
assertEquals(1, matches.getMatches().size());
assertEquals(3, matches.getMatches().get(0).getMarkCount());
assertEquals(41, matches.getMatches().get(0).getTokenCount());
});
}
}
}

View File

@ -1,12 +0,0 @@
unsigned char _ctype[] = { 3,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4
};