Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
Add LCOV handling to Emma's ANT driver/jar
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Baverstock committed Jan 18, 2010
1 parent b5a69bd commit 0b5519a
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 3 deletions.
8 changes: 7 additions & 1 deletion ant/ant14/com/vladium/emma/emmajavaTask.java
Expand Up @@ -19,6 +19,7 @@
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;

Expand Down Expand Up @@ -471,6 +472,11 @@ public final Element_TXT createTxt ()
return m_reportCfg.createTxt ();
}

public final Element_LCOV createLcov ()
{
return m_reportCfg.createLcov ();
}

public final Element_HTML createHtml ()
{
return m_reportCfg.createHtml ();
Expand Down Expand Up @@ -584,4 +590,4 @@ protected boolean isEnabled ()
private Boolean m_outFileMerge;

} // end of class
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
26 changes: 25 additions & 1 deletion ant/ant14/com/vladium/emma/report/ReportCfg.java
Expand Up @@ -195,6 +195,24 @@ protected final String getType ()

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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 ()
Expand Down Expand Up @@ -308,6 +326,12 @@ public Element_TXT createTxt ()
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,
Expand Down Expand Up @@ -421,4 +445,4 @@ private BuildException getFailure ()
private transient boolean m_processed;

} // end of class
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
6 changes: 6 additions & 0 deletions ant/ant14/com/vladium/emma/report/reportTask.java
Expand Up @@ -16,6 +16,7 @@
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;

Expand Down Expand Up @@ -104,6 +105,11 @@ public Element_TXT createTxt ()
return m_reportCfg.createTxt ();
}

public Element_LCOV createLcov ()
{
return m_reportCfg.createLcov ();
}

public Element_HTML createHtml ()
{
return m_reportCfg.createHtml ();
Expand Down
Expand Up @@ -43,7 +43,7 @@ public static IReportGenerator create (final String type)

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 ();
Expand Down

0 comments on commit 0b5519a

Please sign in to comment.