summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoria Ciurdar <horia@google.com>2010-02-02 03:28:28 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-02-02 03:28:28 -0800
commitf28cf9518aba6860847cde9171a078021419df0b (patch)
tree004c09655fce1048693ebbe34d3a3bfdf94c13e1
parentad042bb26b93e31bd7d32f3f1000bd0d791850a6 (diff)
parent0b5519af3cd5ac3a90a29d110fea49345e8e286b (diff)
downloademma-f28cf9518aba6860847cde9171a078021419df0b.tar.gz
Merge "Add LCOV handling to Emma's ANT driver/jar"
-rw-r--r--ant/ant14/com/vladium/emma/emmajavaTask.java8
-rw-r--r--ant/ant14/com/vladium/emma/report/ReportCfg.java26
-rw-r--r--ant/ant14/com/vladium/emma/report/reportTask.java6
-rw-r--r--core/java12/com/vladium/emma/report/AbstractReportGenerator.java2
4 files changed, 39 insertions, 3 deletions
diff --git a/ant/ant14/com/vladium/emma/emmajavaTask.java b/ant/ant14/com/vladium/emma/emmajavaTask.java
index cf4339a..929390c 100644
--- a/ant/ant14/com/vladium/emma/emmajavaTask.java
+++ b/ant/ant14/com/vladium/emma/emmajavaTask.java
@@ -19,6 +19,7 @@ import com.vladium.emma.report.ReportCfg;
import com.vladium.emma.report.IReportEnums.DepthAttribute;
import com.vladium.emma.report.IReportEnums.UnitsTypeAttribute;
import com.vladium.emma.report.ReportCfg.Element_HTML;
+import com.vladium.emma.report.ReportCfg.Element_LCOV;
import com.vladium.emma.report.ReportCfg.Element_TXT;
import com.vladium.emma.report.ReportCfg.Element_XML;
@@ -471,6 +472,11 @@ class emmajavaTask extends Java
return m_reportCfg.createTxt ();
}
+ public final Element_LCOV createLcov ()
+ {
+ return m_reportCfg.createLcov ();
+ }
+
public final Element_HTML createHtml ()
{
return m_reportCfg.createHtml ();
@@ -584,4 +590,4 @@ class emmajavaTask extends Java
private Boolean m_outFileMerge;
} // end of class
-// ---------------------------------------------------------------------------- \ No newline at end of file
+// ----------------------------------------------------------------------------
diff --git a/ant/ant14/com/vladium/emma/report/ReportCfg.java b/ant/ant14/com/vladium/emma/report/ReportCfg.java
index 71a01b4..2d8b73f 100644
--- a/ant/ant14/com/vladium/emma/report/ReportCfg.java
+++ b/ant/ant14/com/vladium/emma/report/ReportCfg.java
@@ -195,6 +195,24 @@ class ReportCfg implements IReportProperties
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ public static class Element_LCOV extends Element
+ {
+ protected final String getType ()
+ {
+ return TYPE;
+ }
+
+ Element_LCOV (final Task task, final IProperties settings)
+ {
+ super (task, settings);
+ }
+
+ static final String TYPE = "lcov";
+
+ } // end of nested class
+
+ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
public static class Element_XML extends Element
{
protected final String getType ()
@@ -308,6 +326,12 @@ class ReportCfg implements IReportProperties
new Element_TXT (m_task, m_settings));
}
+ public Element_LCOV createLcov ()
+ {
+ return (Element_LCOV) addCfgElement (Element_LCOV.TYPE,
+ new Element_LCOV (m_task, m_settings));
+ }
+
public Element_HTML createHtml ()
{
return (Element_HTML) addCfgElement (Element_HTML.TYPE,
@@ -421,4 +445,4 @@ class ReportCfg implements IReportProperties
private transient boolean m_processed;
} // end of class
-// ---------------------------------------------------------------------------- \ No newline at end of file
+// ----------------------------------------------------------------------------
diff --git a/ant/ant14/com/vladium/emma/report/reportTask.java b/ant/ant14/com/vladium/emma/report/reportTask.java
index 931fad4..eb57873 100644
--- a/ant/ant14/com/vladium/emma/report/reportTask.java
+++ b/ant/ant14/com/vladium/emma/report/reportTask.java
@@ -16,6 +16,7 @@ import com.vladium.util.IProperties;
import com.vladium.emma.ant.FileTask;
import com.vladium.emma.ant.SuppressableTask;
import com.vladium.emma.report.ReportCfg.Element_HTML;
+import com.vladium.emma.report.ReportCfg.Element_LCOV;
import com.vladium.emma.report.ReportCfg.Element_TXT;
import com.vladium.emma.report.ReportCfg.Element_XML;
@@ -104,6 +105,11 @@ final class reportTask extends FileTask implements IReportProperties, IReportEnu
return m_reportCfg.createTxt ();
}
+ public Element_LCOV createLcov ()
+ {
+ return m_reportCfg.createLcov ();
+ }
+
public Element_HTML createHtml ()
{
return m_reportCfg.createHtml ();
diff --git a/core/java12/com/vladium/emma/report/AbstractReportGenerator.java b/core/java12/com/vladium/emma/report/AbstractReportGenerator.java
index b0330ee..2a79c20 100644
--- a/core/java12/com/vladium/emma/report/AbstractReportGenerator.java
+++ b/core/java12/com/vladium/emma/report/AbstractReportGenerator.java
@@ -43,7 +43,7 @@ abstract class AbstractReportGenerator extends AbstractItemVisitor
if ("html".equals (type))
return new com.vladium.emma.report.html.ReportGenerator ();
- if ("lcov".equals (type))
+ else if ("lcov".equals (type))
return new com.vladium.emma.report.lcov.ReportGenerator ();
else if ("txt".equals (type))
return new com.vladium.emma.report.txt.ReportGenerator ();