Skip to content
Permalink
Browse files
[FIXED JENKINS-15914] Fixed comments logic
  • Loading branch information
kinow committed Nov 25, 2012
1 parent 17c387b commit 490d52e73058d1ecc5f453f5cb943135725332e4
Showing with 15 additions and 2 deletions.
  1. +6 −0 src/main/java/org/tap4j/plugin/TapResult.java
  2. +9 −2 src/main/resources/org/tap4j/plugin/tags/line.jelly
@@ -43,6 +43,7 @@
import org.tap4j.consumer.TapConsumer;
import org.tap4j.consumer.TapConsumerFactory;
import org.tap4j.model.BailOut;
import org.tap4j.model.Comment;
import org.tap4j.model.Directive;
import org.tap4j.model.TestResult;
import org.tap4j.model.TestSet;
@@ -202,6 +203,7 @@ private boolean isFailure(TestResult testResult) {
boolean r = false;
Directive directive = testResult.getDirective();
StatusValues status = testResult.getStatus();
// TODO !
if (directive != null
&& directive.getDirectiveValue() == DirectiveValues.TODO) {
r = true;
@@ -225,6 +227,10 @@ public boolean isTestResult(Object tapResult) {
public boolean isBailOut(Object tapResult) {
return (tapResult != null && tapResult instanceof BailOut);
}

public boolean isComment(Object tapResult) {
return (tapResult != null && tapResult instanceof Comment);
}

/**
* @return the name
@@ -6,7 +6,6 @@
<j:when test="${attrs.tapLine != null}">
<j:set var="tapLine" value="${attrs.tapLine}" />
<j:set var="tapFile" value="${attrs.tapFile}" />

<j:choose>
<j:when test="${it.isTestResult( tapLine )}">
<tr>
@@ -16,7 +15,7 @@
<tap:directive directive="${tapLine.directive}" />
</tr>
<!-- Comments diagnostics -->
<tap:comments diagnostic="${tapLine.comments}" />
<!-- tap:comments diagnostic="${tapLine.comments}" /-->
<!-- YAML Diagnostics -->
<tap:yaml diagnostic="${tapLine.diagnostic}" tapFile="${tapFile}" />
</j:when>
@@ -28,6 +27,14 @@
<tap:directive directive="" />
</tr>
</j:when>
<j:when test="${it.isComment( tapLine )}">
<tr>
<td></td>
<td colspan='3'>
# ${tapLine.text}<br/>
</td>
</tr>
</j:when>
</j:choose>
</j:when>
<j:otherwise></j:otherwise>

0 comments on commit 490d52e

Please sign in to comment.