summaryrefslogtreecommitdiff
path: root/chapter21/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'chapter21/src/test/java')
-rw-r--r--chapter21/src/test/java/com/seaofnodes/simple/TestC.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/chapter21/src/test/java/com/seaofnodes/simple/TestC.java b/chapter21/src/test/java/com/seaofnodes/simple/TestC.java
index 1cf1f36a..53150222 100644
--- a/chapter21/src/test/java/com/seaofnodes/simple/TestC.java
+++ b/chapter21/src/test/java/com/seaofnodes/simple/TestC.java
@@ -50,6 +50,10 @@ public abstract class TestC {
byte error;
try { error = (byte)gcc.waitFor(); } catch( InterruptedException e ) { throw new IOException("interrupted"); }
String result = new String(gcc.getInputStream().readAllBytes());
+ if( error==0 ) {
+ System.err.println("gcc error code: "+error);
+ System.err.println(result);
+ }
assertEquals( 0, error );
assertTrue(result.isEmpty()); // No data in error stream