Add black box spec tests validation

This commit is contained in:
victor.petukhov
2018-12-13 19:23:57 +03:00
parent a422db91b2
commit f3774b8e19
5 changed files with 36 additions and 6 deletions
@@ -67,8 +67,7 @@ class TestExceptionsComparator(wholeFile: File) {
(e.original.cause ?: e.original).run {
casesAsString + toString() + stackTrace[0]?.let { ls + it }
}
is TestsCompilerError, is TestsInfrastructureError -> casesAsString + (e.original.cause ?: e.original).toString()
is TestsCompiletimeError -> throw e.original
is TestsCompilerError, is TestsCompiletimeError, is TestsInfrastructureError -> casesAsString + (e.original.cause ?: e.original).toString()
}
}
@@ -546,10 +546,11 @@ public abstract class CodegenTestCase extends KtUsefulTestCase {
e1.printStackTrace();
System.err.println("-----------------------------------------------------------------------------");
}
fail("See exceptions above");
System.err.println("See exceptions above");
} else {
fail("Compilation failure");
System.err.println("Compilation failure");
}
throw e;
} catch (Throwable e) {
throw new TestsCompilerError(e);
}