diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/PartCover/xslt/Report By Assembly.xslt | 3 | ||||
-rw-r--r-- | tools/PartCover/xslt/Report By Class.xslt | 12 |
2 files changed, 7 insertions, 8 deletions
diff --git a/tools/PartCover/xslt/Report By Assembly.xslt b/tools/PartCover/xslt/Report By Assembly.xslt index 9309e4e..99d3c67 100644 --- a/tools/PartCover/xslt/Report By Assembly.xslt +++ b/tools/PartCover/xslt/Report By Assembly.xslt @@ -68,4 +68,5 @@ </tr> </xsl:for-each> </table> - </xsl:template>
\ No newline at end of file + </xsl:template> +</xsl:stylesheet>
\ No newline at end of file diff --git a/tools/PartCover/xslt/Report By Class.xslt b/tools/PartCover/xslt/Report By Class.xslt index 3aa87ae..caffbfc 100644 --- a/tools/PartCover/xslt/Report By Class.xslt +++ b/tools/PartCover/xslt/Report By Class.xslt @@ -16,7 +16,7 @@ <td colspan="2">Coverage by class</td> </tr> - <xsl:for-each select="/PartCoverReport[@version='4.0']/Type"> + <xsl:for-each select="/PartCoverReport/Type"> <tr> <xsl:element name="td"> @@ -24,8 +24,8 @@ <xsl:value-of select="@name"/> </xsl:element> - <xsl:variable name="codeSize" select="sum(./Method/pt/@len)+sum(./Method[count(pt)=0]/@bodysize)"/> - <xsl:variable name="coveredCodeSize" select="sum(./Method/pt[@visit>0]/@len)"/> + <xsl:variable name="codeSize" select="sum(./Method/pt/@len)+0"/> + <xsl:variable name="coveredCodeSize" select="sum(./Method/pt[@visit>0]/@len)+0"/> <xsl:element name="td"> <xsl:if test="$codeSize=0"> @@ -36,7 +36,7 @@ </xsl:if> <xsl:if test="$codeSize > 0"> - <xsl:variable name="coverage" select="round(100 * $coveredCodeSize div $codeSize)"/> + <xsl:variable name="coverage" select="ceiling(100 * $coveredCodeSize div $codeSize)"/> <xsl:if test="$coverage >= 0 and $coverage < 20"> <xsl:attribute name="style"> @@ -70,7 +70,5 @@ </tr> </xsl:for-each> </table> - </xsl:template> - -</xsl:stylesheet> +</xsl:stylesheet>
\ No newline at end of file |