Skip to content

Commit

Permalink
fixup! Fix parsing for mixture of Kotlin and CMake output
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisBauer committed Jan 2, 2024
1 parent 5619556 commit d2190c7
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/test/java/edu/hm/hafner/analysis/parser/JavacParserTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,31 @@ void kotlinAndCmakeDirectoryOuptut() {
Report warnings = parse("kotlin-cmake.txt");

assertThat(warnings).hasSize(5);

assertThat(warnings.get(0)).hasSeverity(Severity.WARNING_NORMAL)
.hasLineStart(214)
.hasColumnStart(35)
.hasFileName("/project/app/src/main/java/ui/Activity.kt");
assertThat(warnings.get(1)).hasSeverity(Severity.WARNING_NORMAL)
.hasLineStart(424)
.hasColumnStart(29)
.hasFileName("/project/app/src/main/java/ui/Activity.kt");
assertThat(warnings.get(2)).hasSeverity(Severity.WARNING_NORMAL)
.hasLineStart(425)
.hasColumnStart(29)
.hasFileName("/project/app/src/main/java/ui/Activity.kt")
.hasCategory("Deprecation")
.hasMessage("deprecated: Serializable! to kotlin.collections.HashMap<String, String> /* = java.util.HashMap<String, String> */");
assertThat(warnings.get(3)).hasSeverity(Severity.WARNING_NORMAL)
.hasLineStart(200)
.hasColumnStart(2)
.hasFileName("C:/project/app/src/main/java/ui/Activity.kt");
assertThat(warnings.get(4)).hasSeverity(Severity.WARNING_NORMAL)
.hasLineStart(8)
.hasColumnStart(27)
.hasCategory("Deprecation")
.hasFileName("file:///project/src/main/java/com/app/ui/model/Activity.kt")
.hasMessage("'PackageStats' is deprecated. Deprecated in Java");
}
}

0 comments on commit d2190c7

Please sign in to comment.