Skip to content

Commit 47bda5b

Browse files
committed
Fixed bug in ErrorMapper module, many other minor changes
1 parent 0e53da9 commit 47bda5b

File tree

11 files changed

+1076
-220
lines changed

11 files changed

+1076
-220
lines changed

.classpath

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@
44
<classpathentry kind="lib" path="src/JavaTddPluginSupport.jar"/>
55
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/ant"/>
66
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
7+
<classpathentry kind="lib" path="src/gzoltar/gzoltar-0.0.10.jar"/>
8+
<classpathentry kind="lib" path="src/gzoltar/javaparser-core-2.2.1.jar"/>
9+
<classpathentry kind="lib" path="src/gzoltar/log4j-1.2.17.jar"/>
710
<classpathentry kind="output" path="bin"/>
811
</classpath>

Properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#This file is automatically rewritten by ANT. Hand-edits may be lost.
2-
#Sun Jul 29 13:35:09 GMT-05:00 2018
2+
#Sat Apr 20 13:24:36 GMT-05:00 2019
33
version.minor=1
44
timeoutMultiplier=2
55
license.url="http\://www.gnu.org/licenses/agpl.html"
@@ -11,10 +11,10 @@ interpreter.prefix="${PerlForPlugins.perl.exe}"
1111
languages=( { name \= Java; version \= 1.4
1212
autoPublish=true
1313
version.major=4
14-
version.date=20180729
14+
version.date=20190420
1515
timeoutInternalPadding=400
1616
provider="Virginia Tech Computer Science"
1717
authorUid=edwards
1818
provider.url="http\://web-cat.org/updates"
19-
version.revision=1
19+
version.revision=2
2020
name="JavaTddPlugin"

java-src/net/sf/webcat/plugins/javatddplugin/HintingJUnitResultFormatter.java

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,10 @@ else if (result.code == 10)
246246
// Look for explicit hint first
247247
if (hint == null
248248
&& result.message != null
249+
&& (result.code == 29
250+
|| result.code == 30
251+
|| result.level == 2
252+
|| result.message.toLowerCase().startsWith("hint:"))
249253
&& !Pattern.compile("In file .*( which reads|on this line):")
250254
.matcher(result.message).find()
251255
/* && result.message.matches(HINT_MARKER_PLUS_ALL_RE) */)
@@ -323,7 +327,7 @@ else if (result.code == 10)
323327
}
324328

325329
// Generate output for hint feedback
326-
System.out.println(currentSuite + ", hint = " + hint);
330+
// System.out.println(currentSuite + ", hint = " + hint);
327331
if (output != null && hint != null)
328332
{
329333
synchronized (output)
@@ -333,7 +337,33 @@ else if (result.code == 10)
333337
outBuffer.append(", ");
334338
outBuffer.append(result.priority);
335339
outBuffer.append(", ");
336-
outBuffer.append(perlStringLiteral(hint));
340+
// outBuffer.append(result.code);
341+
// outBuffer.append(", ");
342+
// outBuffer.append(result.level);
343+
// outBuffer.append(", ");
344+
// if (hint == null)
345+
// {
346+
// outBuffer.append(" undef");
347+
// }
348+
// else
349+
// {
350+
outBuffer.append(perlStringLiteral(hint));
351+
// }
352+
// if (result.error == null)
353+
// {
354+
// outBuffer.append(", undef");
355+
// }
356+
// else
357+
// {
358+
// Throwable t = result.error;
359+
// while (t.getCause() != null)
360+
// {
361+
// t = t.getCause();
362+
// }
363+
// outBuffer.append(", '");
364+
// outBuffer.append(t.getClass().getName());
365+
// outBuffer.append("'");
366+
// }
337367
if ( traceMsg == null )
338368
{
339369
outBuffer.append( ", undef);" );

java-src/net/sf/webcat/plugins/javatddplugin/PlistJUnitResultFormatter.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ else if (actual.length() > MAX_MSG_LENGTH)
320320
*/
321321
protected void formatTestResultAsPlist(Test test, Throwable error)
322322
{
323-
formatTestResultAsPlist( describe(test, error));
323+
formatTestResultAsPlist(describe(test, error));
324324
}
325325

326326

@@ -343,6 +343,15 @@ private void appendResults(String str)
343343
// ----------------------------------------------------------
344344
private void appendResultsQuotedValue(String str)
345345
{
346+
if (str == null)
347+
{
348+
str = "";
349+
}
350+
if (str.length() > 1024)
351+
{
352+
str = str.substring(0, 1024) + "...";
353+
}
354+
346355
testResultsPlist.append('"');
347356
testResultsPlist.append(str.replace("\"", "\\\""));
348357
testResultsPlist.append('"');

0 commit comments

Comments
 (0)