Skip to content

Commit

Permalink
Merge hotfix branch into master
Browse files Browse the repository at this point in the history
  • Loading branch information
gquerret committed Nov 7, 2019
2 parents 28d6f6b + d5352f7 commit b2bc401
Show file tree
Hide file tree
Showing 11 changed files with 1,125 additions and 15 deletions.
2 changes: 1 addition & 1 deletion database-parser/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>eu.rssw.openedge.parsers</groupId>
<artifactId>database-parser</artifactId>
<version>2.6.3</version>
<version>2.6.4</version>

<name>OpenEdge database definition lexer and parser</name>
<description>OpenEdge dump files parser</description>
Expand Down
2 changes: 1 addition & 1 deletion listing-parser/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>eu.rssw.openedge.parsers</groupId>
<artifactId>listing-parser</artifactId>
<version>2.6.3</version>
<version>2.6.4</version>

<name>OpenEdge listing so-called parser</name>
<description>OpenEdge listing files parser</description>
Expand Down
6 changes: 3 additions & 3 deletions openedge-checks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>eu.rssw.openedge.checks</groupId>
<artifactId>openedge-checks</artifactId>
<version>2.6.3</version>
<version>2.6.4</version>

<name>OpenEdge checks</name>
<description>OpenEdge checks</description>
Expand Down Expand Up @@ -54,12 +54,12 @@
<dependency>
<groupId>eu.rssw.openedge.parsers</groupId>
<artifactId>database-parser</artifactId>
<version>2.6.3</version>
<version>2.6.4</version>
</dependency>
<dependency>
<groupId>eu.rssw.openedge.parsers</groupId>
<artifactId>proparse</artifactId>
<version>2.6.3</version>
<version>2.6.4</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
Expand Down
8 changes: 4 additions & 4 deletions openedge-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>eu.rssw.sonar.openedge</groupId>
<artifactId>sonar-openedge-plugin</artifactId>
<version>2.6.3</version>
<version>2.6.4</version>
<packaging>sonar-plugin</packaging>

<name>OpenEdge plugin for SonarQube</name>
Expand Down Expand Up @@ -62,17 +62,17 @@
<dependency>
<groupId>eu.rssw.openedge.checks</groupId>
<artifactId>openedge-checks</artifactId>
<version>2.6.3</version>
<version>2.6.4</version>
</dependency>
<dependency>
<groupId>eu.rssw.openedge.parsers</groupId>
<artifactId>listing-parser</artifactId>
<version>2.6.3</version>
<version>2.6.4</version>
</dependency>
<dependency>
<groupId>eu.rssw.openedge.parsers</groupId>
<artifactId>profiler-parser</artifactId>
<version>2.6.3</version>
<version>2.6.4</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
Expand Down
2 changes: 1 addition & 1 deletion profiler-parser/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>eu.rssw.openedge.parsers</groupId>
<artifactId>profiler-parser</artifactId>
<version>2.6.3</version>
<version>2.6.4</version>

<name>OpenEdge profiler output lexer and parser</name>
<description>OpenEdge profiler files parser</description>
Expand Down
10 changes: 8 additions & 2 deletions profiler-parser/src/main/java/eu/rssw/antlr/profiler/Module.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,18 @@ public Set<LineData> getLineData() {
* sous-répertoire et extension
*/
public String getModuleObject() {
// Up to 12.0 : name contains either file name or (internal procedure + file name)
// Starting from 12.1: third entry (optional), callee name when using super:xxx() or methods not overidden in child
// class
if (name.indexOf(' ') > -1) {
return name.substring(name.indexOf(' ') + 1);
String tmp = name.substring(name.indexOf(' ') + 1);
if (tmp.indexOf(' ') > -1)
return tmp.substring(0, tmp.indexOf(' '));
else
return tmp;
} else {
return name;
}

}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,23 @@ public void testProfiler10() throws IOException {
Assert.assertTrue(session.getModuleById(1).getLinesToCover().contains(-2));
}

@Test
public void testProfiler11() throws IOException {
// New file format in 12.1 - Module name includes callee name when using super:xxx() or methods not overidden in child class
ProfilerSession session = ProfilerUtils.getProfilerSession(new File("src/test/resources/profiler11.out"));
Assert.assertEquals(session.getVersionNumber(), 3);
Assert.assertEquals(session.getModules().size(), 7);
Assert.assertNotNull(session.getModuleByName("MyLogger"));
Assert.assertEquals(session.getModuleByName("MyLogger").getCoveredLines().size(), 3);
Assert.assertEquals(session.getModuleByName("MyLogger").getLinesToCover().size(), 3);

// Same test but using 11.7 profiler
ProfilerSession session2 = ProfilerUtils.getProfilerSession(new File("src/test/resources/profiler12.out"));
Assert.assertEquals(session2.getVersionNumber(), 1);
Assert.assertEquals(session2.getModules().size(), 7);
Assert.assertNotNull(session2.getModuleByName("MyLogger"));
Assert.assertEquals(session2.getModuleByName("MyLogger").getCoveredLines().size(), 3);
Assert.assertEquals(session2.getModuleByName("MyLogger").getLinesToCover().size(), 3);
}

}
Loading

0 comments on commit b2bc401

Please sign in to comment.