Skip to content

Commit afabff2

Browse files
committed
Updated version, fix the test case.
1 parent 77a92b6 commit afabff2

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

analyzer-cppcheck/src/test/java/io/codety/scanner/analyzer/cppcheck/CppcheckCodeAnalyzerTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ void testBasicRunWithIssueDetected() throws IOException {
6363
@Test
6464
void testDeserialize() throws Exception {
6565

66-
String s = Files.readString(Path.of(this.getClass().getResource("/cppcheck/error-result-example.txt").getFile()).toAbsolutePath());
66+
String s = Files.readString(Path.of(this.getClass().getResource("/cppcheck/error-out.txt").getFile()).toAbsolutePath());
6767
List<CodeAnalysisIssueDto> recordDtos = CppcheckResultConverter.convertResult(s);
6868
Assertions.assertTrue(recordDtos.size() > 0);
6969

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
##@@_@@##arrayIndexOutOfBounds@@@@@@788@@@@@@/Users/user/git/codety-scanner/analyzer-cppcheck/build/resources/test/cppcheck/cpp-code-with-issues/cpp.cpp@@@@@@25@@@@@@error@@@@@@Array 'a[10]' accessed at index 10, which is out of bounds.
2+
|--@@/Users/user/git/codety-scanner/analyzer-cppcheck/build/resources/test/cppcheck/cpp-code-with-issues/cpp.cpp@@@@@@7@@@@@@10@@@@@@Assignment 'n=10', assigned value is 10
3+
|--@@/Users/user/git/codety-scanner/analyzer-cppcheck/build/resources/test/cppcheck/cpp-code-with-issues/cpp.cpp@@@@@@23@@@@@@27@@@@@@Assuming that condition 'i<n' is not redundant
4+
|--@@/Users/user/git/codety-scanner/analyzer-cppcheck/build/resources/test/cppcheck/cpp-code-with-issues/cpp.cpp@@@@@@25@@@@@@11@@@@@@Array index out of bounds
5+
##@@_@@##uninitvar@@@@@@457@@@@@@/Users/user/git/codety-scanner/analyzer-cppcheck/build/resources/test/cppcheck/cpp-code-with-issues/cpp.cpp@@@@@@23@@@@@@warning@@@@@@Uninitialized variable: position
6+
|--@@/Users/user/git/codety-scanner/analyzer-cppcheck/build/resources/test/cppcheck/cpp-code-with-issues/cpp.cpp@@@@@@20@@@@@@13@@@@@@Assuming condition is false
7+
|--@@/Users/user/git/codety-scanner/analyzer-cppcheck/build/resources/test/cppcheck/cpp-code-with-issues/cpp.cpp@@@@@@23@@@@@@15@@@@@@Uninitialized variable: position

0 commit comments

Comments
 (0)