fix error reporting in CodegenTestCase

This commit is contained in:
Stepan Koltsov
2011-12-31 00:53:32 +04:00
parent b22ec83b15
commit 07281691b5
4 changed files with 15 additions and 5 deletions
@@ -1,5 +1,7 @@
package org.jetbrains.jet.codegen;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jet.compiler.CompileEnvironment;
import org.jetbrains.jet.compiler.CompileSession;
@@ -30,6 +32,7 @@ public class StdlibTest extends CodegenTestCase {
return session.generateText();
}
@NotNull
protected ClassFileFactory generateClassesInFile() {
try {
CompileSession session = new CompileSession(myEnvironment);
@@ -38,7 +41,7 @@ public class StdlibTest extends CodegenTestCase {
session.addStdLibSources(true);
if (!session.analyze(System.out)) {
return null;
throw new RuntimeException();
}
return session.generate();