Allow error types in some cases for lazy resolve tests
This commit is contained in:
+11
-5
@@ -44,18 +44,18 @@ public abstract class AbstractLazyResolveNamespaceComparingTest extends KotlinTe
|
||||
}
|
||||
|
||||
protected void doTestCheckingPrimaryConstructors(String testFileName) throws IOException {
|
||||
doTest(testFileName, true, false);
|
||||
doTest(testFileName, true, false, true);
|
||||
}
|
||||
|
||||
protected void doTestCheckingPrimaryConstructorsAndAccessors(String testFileName) throws IOException {
|
||||
doTest(testFileName, true, true);
|
||||
doTest(testFileName, true, true, false);
|
||||
}
|
||||
|
||||
protected void doTestNotCheckingPrimaryConstructors(String testFileName) throws IOException {
|
||||
doTest(testFileName, false, false);
|
||||
doTest(testFileName, false, false, false);
|
||||
}
|
||||
|
||||
private void doTest(String testFileName, boolean checkPrimaryConstructors, boolean checkPropertyAccessors) throws IOException {
|
||||
private void doTest(String testFileName, boolean checkPrimaryConstructors, boolean checkPropertyAccessors, boolean allowErrorTypes) throws IOException {
|
||||
List<JetFile> files = JetTestUtils
|
||||
.createTestFiles(testFileName, FileUtil.loadFile(new File(testFileName), true),
|
||||
new JetTestUtils.TestFileFactory<JetFile>() {
|
||||
@@ -78,7 +78,13 @@ public abstract class AbstractLazyResolveNamespaceComparingTest extends KotlinTe
|
||||
|
||||
File serializeResultsTo = new File(FileUtil.getNameWithoutExtension(testFileName) + ".txt");
|
||||
|
||||
DescriptorValidator.validate(expected, actual);
|
||||
if (allowErrorTypes) {
|
||||
DescriptorValidator.validateIgnoringErrorTypes(expected, actual);
|
||||
}
|
||||
else {
|
||||
DescriptorValidator.validate(expected, actual);
|
||||
}
|
||||
|
||||
|
||||
NamespaceComparator.compareNamespaces(
|
||||
expected, actual, NamespaceComparator.DONT_INCLUDE_METHODS_OF_OBJECT.filterRecursion(
|
||||
|
||||
Reference in New Issue
Block a user