diff --git a/test/com/google/javascript/jscomp/CommandLineRunnerTest.java b/test/com/google/javascript/jscomp/CommandLineRunnerTest.java
index <HASH>..<HASH> 100644
--- a/test/com/google/javascript/jscomp/CommandLineRunnerTest.java
+++ b/test/com/google/javascript/jscomp/CommandLineRunnerTest.java
@@ -1884,7 +1884,6 @@ public final class CommandLineRunnerTest extends TestCase {
   private void test(String[] original, String[] compiled, DiagnosticType warning) {
     exitCodes.clear();
     Compiler compiler = compile(original);
-    assertThat(exitCodes).containsExactly(0);
 
     if (warning == null) {
       assertEquals("Expected no warnings or errors\n" +
@@ -1906,6 +1905,8 @@ public final class CommandLineRunnerTest extends TestCase {
           "\nResult: " + compiler.toSource(root) +
           "\n" + explanation, explanation);
     }
+
+    assertThat(exitCodes).containsExactly(0);
   }
 
   /**
Move the exit code test to the end of the function so that it doesn't hide real error messages.