-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Types for JaCoCo XML object (#95)
* Adding type information to the parsed XML obj * Refactoring convertObjToReport * Rename jacoco-types file * Removing nonNull function * Adding Unit Tests * Fix parser to not return NaN * Remove redundant number parsing
- Loading branch information
1 parent
642c391
commit 2dd19a5
Showing
37 changed files
with
3,681 additions
and
2,792 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><!DOCTYPE report PUBLIC "-//JACOCO//DTD Report 1.0//EN" | ||
"report.dtd"> | ||
<report name="Empty Report"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><!DOCTYPE report PUBLIC "-//JACOCO//DTD Report 1.0//EN" | ||
"report.dtd"> | ||
<report name="Empty Group"> | ||
<group name="Group1" /> | ||
</report> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><!DOCTYPE report PUBLIC "-//JACOCO//DTD Report 1.0//EN" | ||
"report.dtd"> | ||
<report name="Only Group with Counter"> | ||
<group name="Group1"><counter type="INSTRUCTION" missed="1" covered="2"/></group> | ||
</report> |
7 changes: 7 additions & 0 deletions
7
__tests__/__fixtures__/reports/group/group_with_empty_package.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><!DOCTYPE report PUBLIC "-//JACOCO//DTD Report 1.0//EN" | ||
"report.dtd"> | ||
<report name="Only Group with empty Package"> | ||
<group name="Group1"> | ||
<package name="Package1" /> | ||
</group> | ||
</report> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><!DOCTYPE report PUBLIC "-//JACOCO//DTD Report 1.0//EN" | ||
"report.dtd"> | ||
<report name="Only Group with Group"> | ||
<group name="Group1"> | ||
<group name="Group2"> | ||
<counter type="INSTRUCTION" missed="1" covered="2"/> | ||
</group> | ||
</group> | ||
</report> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><!DOCTYPE report PUBLIC "-//JACOCO//DTD Report 1.0//EN" | ||
"report.dtd"> | ||
<report name="Only Group with Package"> | ||
<group name="Group1"> | ||
<package name="Package1"> | ||
<counter type="INSTRUCTION" missed="1" covered="2"/> | ||
</package> | ||
</group> | ||
</report> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><!DOCTYPE report PUBLIC "-//JACOCO//DTD Report 1.0//EN" | ||
"report.dtd"> | ||
<report name="Only Counter"> | ||
<counter type="INSTRUCTION" missed="1" covered="2"/> | ||
</report> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><!DOCTYPE report PUBLIC "-//JACOCO//DTD Report 1.0//EN" | ||
"report.dtd"> | ||
<report name="Only Session"> | ||
<sessioninfo id="session1" start="1620000000" dump="1620003600"/> | ||
</report> |
9 changes: 9 additions & 0 deletions
9
__tests__/__fixtures__/reports/package/class/class_with_counter.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><!DOCTYPE report PUBLIC "-//JACOCO//DTD Report 1.0//EN" | ||
"report.dtd"> | ||
<report name="Only Class with Counter"> | ||
<package name="com.example.package1"> | ||
<class name="com.example.package1.ExampleClass1"> | ||
<counter type="INSTRUCTION" missed="1" covered="2"/> | ||
</class> | ||
</package> | ||
</report> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><!DOCTYPE report PUBLIC "-//JACOCO//DTD Report 1.0//EN" | ||
"report.dtd"> | ||
<report name="Empty Class"> | ||
<package name="com.example.package1"> | ||
<class name="com.example.package1.ExampleClass1"/> | ||
<class name="com.example.package1.ExampleClass2" sourcefilename="ExampleClass2.kt"/> | ||
</package> | ||
</report> |
14 changes: 14 additions & 0 deletions
14
__tests__/__fixtures__/reports/package/class/only_method.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><!DOCTYPE report PUBLIC "-//JACOCO//DTD Report 1.0//EN" | ||
"report.dtd"> | ||
<report name="Only Method"> | ||
<package name="com.example.package1"> | ||
<class name="com.example.package1.ExampleClass1"> | ||
<method name="exampleMethod1" desc="()V"/> | ||
<method name="<init>" desc="()V" line="3"/> | ||
<method name="validate" desc="(Ljava/lang/String;)Z" line="8"> | ||
<counter covered="1" missed="2" type="INSTRUCTION" /> | ||
<counter covered="3" missed="4" type="LINE" /> | ||
</method> | ||
</class> | ||
</package> | ||
</report> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><!DOCTYPE report PUBLIC "-//JACOCO//DTD Report 1.0//EN" | ||
"report.dtd"> | ||
<report name="Empty Package"> | ||
<package name="com.example.package1"/> | ||
</report> |
7 changes: 7 additions & 0 deletions
7
__tests__/__fixtures__/reports/package/package_with_counter.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><!DOCTYPE report PUBLIC "-//JACOCO//DTD Report 1.0//EN" | ||
"report.dtd"> | ||
<report name="Only Package with Counter"> | ||
<package name="com.example.package1"> | ||
<counter type="INSTRUCTION" missed="1" covered="2"/> | ||
</package> | ||
</report> |
7 changes: 7 additions & 0 deletions
7
__tests__/__fixtures__/reports/package/sourcefile/empty_sourcefile.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><!DOCTYPE report PUBLIC "-//JACOCO//DTD Report 1.0//EN" | ||
"report.dtd"> | ||
<report name="Empty SourceFile"> | ||
<package name="com.example.package1"> | ||
<sourcefile name="ExampleFile1.java"/> | ||
</package> | ||
</report> |
13 changes: 13 additions & 0 deletions
13
__tests__/__fixtures__/reports/package/sourcefile/only_line.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><!DOCTYPE report PUBLIC "-//JACOCO//DTD Report 1.0//EN" | ||
"report.dtd"> | ||
<report name="Only Line"> | ||
<package name="com.example.package1"> | ||
<sourcefile name="ExampleFile1.java"> | ||
<line nr="10"/> | ||
<line nr="18" mi="1"/> | ||
<line nr="18" mi="1" ci="2"/> | ||
<line nr="18" mi="1" ci="2" mb="3"/> | ||
<line nr="18" mi="1" ci="2" mb="3" cb="4"/> | ||
</sourcefile> | ||
</package> | ||
</report> |
9 changes: 9 additions & 0 deletions
9
__tests__/__fixtures__/reports/package/sourcefile/sourcefile_with_counter.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><!DOCTYPE report PUBLIC "-//JACOCO//DTD Report 1.0//EN" | ||
"report.dtd"> | ||
<report name="Only SourceFile with Counter"> | ||
<package name="com.example.package1"> | ||
<sourcefile name="ExampleFile1.java"> | ||
<counter type="INSTRUCTION" missed="1" covered="2"/> | ||
</sourcefile> | ||
</package> | ||
</report> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.