diff --git a/compiler/testData/constraintSystem/checkStatus/conflictingConstraints.constraints b/compiler/testData/constraintSystem/checkStatus/conflictingConstraints.constraints new file mode 100644 index 00000000000..a5ac8d81123 --- /dev/null +++ b/compiler/testData/constraintSystem/checkStatus/conflictingConstraints.constraints @@ -0,0 +1,4 @@ +VARIABLES T + +SUBTYPE T Int +SUPERTYPE T String \ No newline at end of file diff --git a/compiler/testData/constraintSystem/checkStatus/successful.constraints b/compiler/testData/constraintSystem/checkStatus/successful.constraints new file mode 100644 index 00000000000..c1b1b12a5fd --- /dev/null +++ b/compiler/testData/constraintSystem/checkStatus/successful.constraints @@ -0,0 +1,4 @@ +VARIABLES T + +SUBTYPE T Int +SUPERTYPE T Int \ No newline at end of file diff --git a/compiler/testData/constraintSystem/checkStatus/typeConstructorMismatch.constraints b/compiler/testData/constraintSystem/checkStatus/typeConstructorMismatch.constraints new file mode 100644 index 00000000000..2e3b5a78d74 --- /dev/null +++ b/compiler/testData/constraintSystem/checkStatus/typeConstructorMismatch.constraints @@ -0,0 +1,3 @@ +VARIABLES T + +SUBTYPE List Int \ No newline at end of file diff --git a/compiler/testData/constraintSystem/checkStatus/unknownParameters.constraints b/compiler/testData/constraintSystem/checkStatus/unknownParameters.constraints new file mode 100644 index 00000000000..9e0d87313e9 --- /dev/null +++ b/compiler/testData/constraintSystem/checkStatus/unknownParameters.constraints @@ -0,0 +1,3 @@ +VARIABLES T + +SUBTYPE Any Any \ No newline at end of file diff --git a/compiler/testData/constraintSystem/checkStatus/violatedUpperBound.constraints b/compiler/testData/constraintSystem/checkStatus/violatedUpperBound.constraints new file mode 100644 index 00000000000..ef8b411f40e --- /dev/null +++ b/compiler/testData/constraintSystem/checkStatus/violatedUpperBound.constraints @@ -0,0 +1,4 @@ +VARIABLES T + +SUBTYPE T Int +SUBTYPE T String weak \ No newline at end of file diff --git a/compiler/testData/constraintSystem/computeValues/contradiction.constraints b/compiler/testData/constraintSystem/computeValues/contradiction.constraints new file mode 100644 index 00000000000..c90fa4b41d5 --- /dev/null +++ b/compiler/testData/constraintSystem/computeValues/contradiction.constraints @@ -0,0 +1,4 @@ +VARIABLES T + +SUBTYPE T B +SUPERTYPE T A \ No newline at end of file diff --git a/compiler/testData/constraintSystem/computeValues/subTypeOfUpperBounds.constraints b/compiler/testData/constraintSystem/computeValues/subTypeOfUpperBounds.constraints new file mode 100644 index 00000000000..c7c0b551365 --- /dev/null +++ b/compiler/testData/constraintSystem/computeValues/subTypeOfUpperBounds.constraints @@ -0,0 +1,4 @@ +VARIABLES T + +SUBTYPE T A +SUBTYPE T B \ No newline at end of file diff --git a/compiler/testData/constraintSystem/computeValues/superTypeOfLowerBounds1.constraints b/compiler/testData/constraintSystem/computeValues/superTypeOfLowerBounds1.constraints new file mode 100644 index 00000000000..7a4c1d73476 --- /dev/null +++ b/compiler/testData/constraintSystem/computeValues/superTypeOfLowerBounds1.constraints @@ -0,0 +1,4 @@ +VARIABLES T + +SUBTYPE T A +SUPERTYPE T C \ No newline at end of file diff --git a/compiler/testData/constraintSystem/computeValues/superTypeOfLowerBounds2.constraints b/compiler/testData/constraintSystem/computeValues/superTypeOfLowerBounds2.constraints new file mode 100644 index 00000000000..fc1003c2de3 --- /dev/null +++ b/compiler/testData/constraintSystem/computeValues/superTypeOfLowerBounds2.constraints @@ -0,0 +1,5 @@ +VARIABLES T + +SUBTYPE T A +SUPERTYPE T B +SUPERTYPE T C \ No newline at end of file diff --git a/compiler/testData/constraintSystem/integerValueTypes/byteOverflow.constraints b/compiler/testData/constraintSystem/integerValueTypes/byteOverflow.constraints new file mode 100644 index 00000000000..008d49843d5 --- /dev/null +++ b/compiler/testData/constraintSystem/integerValueTypes/byteOverflow.constraints @@ -0,0 +1,4 @@ +VARIABLES T + +SUPERTYPE T IntegerValueType(1000) +SUBTYPE T Byte \ No newline at end of file diff --git a/compiler/testData/constraintSystem/integerValueTypes/defaultLong.constraints b/compiler/testData/constraintSystem/integerValueTypes/defaultLong.constraints new file mode 100644 index 00000000000..2ba8bedaa26 --- /dev/null +++ b/compiler/testData/constraintSystem/integerValueTypes/defaultLong.constraints @@ -0,0 +1,4 @@ +VARIABLES T + +SUPERTYPE T IntegerValueType(1) +SUPERTYPE T IntegerValueType(10000000000) \ No newline at end of file diff --git a/compiler/testData/constraintSystem/integerValueTypes/numberAndAny.constraints b/compiler/testData/constraintSystem/integerValueTypes/numberAndAny.constraints new file mode 100644 index 00000000000..89f32451478 --- /dev/null +++ b/compiler/testData/constraintSystem/integerValueTypes/numberAndAny.constraints @@ -0,0 +1,4 @@ +VARIABLES T + +SUPERTYPE T IntegerValueType(1) +SUBTYPE T Any \ No newline at end of file diff --git a/compiler/testData/constraintSystem/integerValueTypes/numberAndString.constraints b/compiler/testData/constraintSystem/integerValueTypes/numberAndString.constraints new file mode 100644 index 00000000000..300daefcb17 --- /dev/null +++ b/compiler/testData/constraintSystem/integerValueTypes/numberAndString.constraints @@ -0,0 +1,4 @@ +VARIABLES T + +SUPERTYPE T IntegerValueType(1) +SUPERTYPE T String \ No newline at end of file diff --git a/compiler/testData/constraintSystem/integerValueTypes/severalNumbers.constraints b/compiler/testData/constraintSystem/integerValueTypes/severalNumbers.constraints new file mode 100644 index 00000000000..0e58b001f34 --- /dev/null +++ b/compiler/testData/constraintSystem/integerValueTypes/severalNumbers.constraints @@ -0,0 +1,4 @@ +VARIABLES T + +SUPERTYPE T IntegerValueType(1) +SUPERTYPE T IntegerValueType(1000) \ No newline at end of file diff --git a/compiler/testData/constraintSystem/integerValueTypes/simpleByte.constraints b/compiler/testData/constraintSystem/integerValueTypes/simpleByte.constraints new file mode 100644 index 00000000000..a8cb3c80fe3 --- /dev/null +++ b/compiler/testData/constraintSystem/integerValueTypes/simpleByte.constraints @@ -0,0 +1,4 @@ +VARIABLES T + +SUPERTYPE T IntegerValueType(1) +SUBTYPE T Byte \ No newline at end of file diff --git a/compiler/testData/constraintSystem/integerValueTypes/simpleInt.constraints b/compiler/testData/constraintSystem/integerValueTypes/simpleInt.constraints new file mode 100644 index 00000000000..2a2545431db --- /dev/null +++ b/compiler/testData/constraintSystem/integerValueTypes/simpleInt.constraints @@ -0,0 +1,3 @@ +VARIABLES T + +SUPERTYPE T IntegerValueType(1) \ No newline at end of file diff --git a/compiler/testData/constraintSystem/integerValueTypes/simpleShort.constraints b/compiler/testData/constraintSystem/integerValueTypes/simpleShort.constraints new file mode 100644 index 00000000000..2de8feeb212 --- /dev/null +++ b/compiler/testData/constraintSystem/integerValueTypes/simpleShort.constraints @@ -0,0 +1,4 @@ +VARIABLES T + +SUPERTYPE T IntegerValueType(1) +SUBTYPE T Short \ No newline at end of file diff --git a/compiler/testData/constraintSystem/severalVariables/simpleDependency.constraints b/compiler/testData/constraintSystem/severalVariables/simpleDependency.constraints new file mode 100644 index 00000000000..4c5f7e33f88 --- /dev/null +++ b/compiler/testData/constraintSystem/severalVariables/simpleDependency.constraints @@ -0,0 +1,3 @@ +VARIABLES T P + +SUBTYPE T Int \ No newline at end of file diff --git a/compiler/testData/constraintSystem/variance/consumer.constraints b/compiler/testData/constraintSystem/variance/consumer.constraints new file mode 100644 index 00000000000..aa4ca88a3ee --- /dev/null +++ b/compiler/testData/constraintSystem/variance/consumer.constraints @@ -0,0 +1,3 @@ +VARIABLES T + +SUBTYPE Consumer Consumer \ No newline at end of file diff --git a/compiler/testData/constraintSystem/variance/invariant.constraints b/compiler/testData/constraintSystem/variance/invariant.constraints new file mode 100644 index 00000000000..cb2df5faa67 --- /dev/null +++ b/compiler/testData/constraintSystem/variance/invariant.constraints @@ -0,0 +1,3 @@ +VARIABLES T + +SUBTYPE My My \ No newline at end of file diff --git a/compiler/testData/constraintSystem/variance/producer.constraints b/compiler/testData/constraintSystem/variance/producer.constraints new file mode 100644 index 00000000000..2044f7f1535 --- /dev/null +++ b/compiler/testData/constraintSystem/variance/producer.constraints @@ -0,0 +1,3 @@ +VARIABLES T + +SUBTYPE Producer Producer \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/kotlin/resolve/constraintSystem/AbstractConstraintSystemTest.kt b/compiler/tests/org/jetbrains/kotlin/resolve/constraintSystem/AbstractConstraintSystemTest.kt index 319527fc06f..1cffd813aba 100644 --- a/compiler/tests/org/jetbrains/kotlin/resolve/constraintSystem/AbstractConstraintSystemTest.kt +++ b/compiler/tests/org/jetbrains/kotlin/resolve/constraintSystem/AbstractConstraintSystemTest.kt @@ -37,7 +37,7 @@ import java.util.regex.Pattern abstract public class AbstractConstraintSystemTest() : JetLiteFixture() { private val typePattern = """([\w|<|>|\(|\)]+)""" - val constraintPattern = Pattern.compile("""(SUBTYPE|SUPERTYPE)\s+${typePattern}\s+${typePattern}\s+(weak)?""", Pattern.MULTILINE) + val constraintPattern = Pattern.compile("""(SUBTYPE|SUPERTYPE)\s+$typePattern\s+$typePattern\s*(weak)?""") val variablesPattern = Pattern.compile("VARIABLES\\s+(.*)") private var _typeResolver: TypeResolver? = null @@ -78,19 +78,19 @@ abstract public class AbstractConstraintSystemTest() : JetLiteFixture() { } public fun doTest(filePath: String) { - val file = File(filePath) - val fileText = JetTestUtils.doLoadFile(file)!! + val constraintsFile = File(filePath) + val constraintsFileText = JetTestUtils.doLoadFile(constraintsFile)!! val constraintSystem = ConstraintSystemImpl() val typeParameterDescriptors = LinkedHashMap() - val variables = parseVariables(fileText) + val variables = parseVariables(constraintsFileText) for (variable in variables) { typeParameterDescriptors.put(testDeclarations.getParameterDescriptor(variable), Variance.INVARIANT) } constraintSystem.registerTypeVariables(typeParameterDescriptors) - val constraints = parseConstraints(fileText) + val constraints = parseConstraints(constraintsFileText) for (constraint in constraints) { val firstType = testDeclarations.getType(constraint.firstType) val secondType = testDeclarations.getType(constraint.secondType) @@ -112,7 +112,8 @@ abstract public class AbstractConstraintSystemTest() : JetLiteFixture() { result append "${typeParameter.getName()}=${resultType?.let{ DescriptorRenderer.SHORT_NAMES_IN_TYPES.renderType(it) }}\n" } - JetTestUtils.assertEqualsToFile(file, "${getConstraintsText(fileText)}${resultingStatus}\n\n${result}\n") + val boundsFile = File(filePath.replace("constraints", "bounds")) + JetTestUtils.assertEqualsToFile(boundsFile, "$constraintsFileText\n\n$resultingStatus\n\n$result\n") } class MyConstraint(val kind: MyConstraintKind, val firstType: String, val secondType: String, val isWeak: Boolean) @@ -142,6 +143,4 @@ abstract public class AbstractConstraintSystemTest() : JetLiteFixture() { } return constraints } - - private fun getConstraintsText(text: String) = text.substring(0, text.indexOf("type parameter bounds")) } diff --git a/compiler/tests/org/jetbrains/kotlin/resolve/constraintSystem/ConstraintSystemTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/resolve/constraintSystem/ConstraintSystemTestGenerated.java index ad46a55b788..dd7ff89021f 100644 --- a/compiler/tests/org/jetbrains/kotlin/resolve/constraintSystem/ConstraintSystemTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/resolve/constraintSystem/ConstraintSystemTestGenerated.java @@ -32,7 +32,7 @@ import java.util.regex.Pattern; @RunWith(JUnit3RunnerWithInners.class) public class ConstraintSystemTestGenerated extends AbstractConstraintSystemTest { public void testAllFilesPresentInConstraintSystem() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem"), Pattern.compile("^(.+)\\.bounds$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem"), Pattern.compile("^(.+)\\.constraints$"), true); } @TestMetadata("compiler/testData/constraintSystem/checkStatus") @@ -40,36 +40,36 @@ public class ConstraintSystemTestGenerated extends AbstractConstraintSystemTest @RunWith(JUnit3RunnerWithInners.class) public static class CheckStatus extends AbstractConstraintSystemTest { public void testAllFilesPresentInCheckStatus() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/checkStatus"), Pattern.compile("^(.+)\\.bounds$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/checkStatus"), Pattern.compile("^(.+)\\.constraints$"), true); } - @TestMetadata("conflictingConstraints.bounds") + @TestMetadata("conflictingConstraints.constraints") public void testConflictingConstraints() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/checkStatus/conflictingConstraints.bounds"); + String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/checkStatus/conflictingConstraints.constraints"); doTest(fileName); } - @TestMetadata("successful.bounds") + @TestMetadata("successful.constraints") public void testSuccessful() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/checkStatus/successful.bounds"); + String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/checkStatus/successful.constraints"); doTest(fileName); } - @TestMetadata("typeConstructorMismatch.bounds") + @TestMetadata("typeConstructorMismatch.constraints") public void testTypeConstructorMismatch() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/checkStatus/typeConstructorMismatch.bounds"); + String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/checkStatus/typeConstructorMismatch.constraints"); doTest(fileName); } - @TestMetadata("unknownParameters.bounds") + @TestMetadata("unknownParameters.constraints") public void testUnknownParameters() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/checkStatus/unknownParameters.bounds"); + String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/checkStatus/unknownParameters.constraints"); doTest(fileName); } - @TestMetadata("violatedUpperBound.bounds") + @TestMetadata("violatedUpperBound.constraints") public void testViolatedUpperBound() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/checkStatus/violatedUpperBound.bounds"); + String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/checkStatus/violatedUpperBound.constraints"); doTest(fileName); } } @@ -79,30 +79,30 @@ public class ConstraintSystemTestGenerated extends AbstractConstraintSystemTest @RunWith(JUnit3RunnerWithInners.class) public static class ComputeValues extends AbstractConstraintSystemTest { public void testAllFilesPresentInComputeValues() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/computeValues"), Pattern.compile("^(.+)\\.bounds$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/computeValues"), Pattern.compile("^(.+)\\.constraints$"), true); } - @TestMetadata("contradiction.bounds") + @TestMetadata("contradiction.constraints") public void testContradiction() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/computeValues/contradiction.bounds"); + String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/computeValues/contradiction.constraints"); doTest(fileName); } - @TestMetadata("subTypeOfUpperBounds.bounds") + @TestMetadata("subTypeOfUpperBounds.constraints") public void testSubTypeOfUpperBounds() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/computeValues/subTypeOfUpperBounds.bounds"); + String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/computeValues/subTypeOfUpperBounds.constraints"); doTest(fileName); } - @TestMetadata("superTypeOfLowerBounds1.bounds") + @TestMetadata("superTypeOfLowerBounds1.constraints") public void testSuperTypeOfLowerBounds1() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/computeValues/superTypeOfLowerBounds1.bounds"); + String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/computeValues/superTypeOfLowerBounds1.constraints"); doTest(fileName); } - @TestMetadata("superTypeOfLowerBounds2.bounds") + @TestMetadata("superTypeOfLowerBounds2.constraints") public void testSuperTypeOfLowerBounds2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/computeValues/superTypeOfLowerBounds2.bounds"); + String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/computeValues/superTypeOfLowerBounds2.constraints"); doTest(fileName); } } @@ -112,54 +112,54 @@ public class ConstraintSystemTestGenerated extends AbstractConstraintSystemTest @RunWith(JUnit3RunnerWithInners.class) public static class IntegerValueTypes extends AbstractConstraintSystemTest { public void testAllFilesPresentInIntegerValueTypes() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/integerValueTypes"), Pattern.compile("^(.+)\\.bounds$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/integerValueTypes"), Pattern.compile("^(.+)\\.constraints$"), true); } - @TestMetadata("byteOverflow.bounds") + @TestMetadata("byteOverflow.constraints") public void testByteOverflow() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/integerValueTypes/byteOverflow.bounds"); + String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/integerValueTypes/byteOverflow.constraints"); doTest(fileName); } - @TestMetadata("defaultLong.bounds") + @TestMetadata("defaultLong.constraints") public void testDefaultLong() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/integerValueTypes/defaultLong.bounds"); + String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/integerValueTypes/defaultLong.constraints"); doTest(fileName); } - @TestMetadata("numberAndAny.bounds") + @TestMetadata("numberAndAny.constraints") public void testNumberAndAny() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/integerValueTypes/numberAndAny.bounds"); + String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/integerValueTypes/numberAndAny.constraints"); doTest(fileName); } - @TestMetadata("numberAndString.bounds") + @TestMetadata("numberAndString.constraints") public void testNumberAndString() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/integerValueTypes/numberAndString.bounds"); + String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/integerValueTypes/numberAndString.constraints"); doTest(fileName); } - @TestMetadata("severalNumbers.bounds") + @TestMetadata("severalNumbers.constraints") public void testSeveralNumbers() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/integerValueTypes/severalNumbers.bounds"); + String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/integerValueTypes/severalNumbers.constraints"); doTest(fileName); } - @TestMetadata("simpleByte.bounds") + @TestMetadata("simpleByte.constraints") public void testSimpleByte() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/integerValueTypes/simpleByte.bounds"); + String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/integerValueTypes/simpleByte.constraints"); doTest(fileName); } - @TestMetadata("simpleInt.bounds") + @TestMetadata("simpleInt.constraints") public void testSimpleInt() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/integerValueTypes/simpleInt.bounds"); + String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/integerValueTypes/simpleInt.constraints"); doTest(fileName); } - @TestMetadata("simpleShort.bounds") + @TestMetadata("simpleShort.constraints") public void testSimpleShort() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/integerValueTypes/simpleShort.bounds"); + String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/integerValueTypes/simpleShort.constraints"); doTest(fileName); } } @@ -169,12 +169,12 @@ public class ConstraintSystemTestGenerated extends AbstractConstraintSystemTest @RunWith(JUnit3RunnerWithInners.class) public static class SeveralVariables extends AbstractConstraintSystemTest { public void testAllFilesPresentInSeveralVariables() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/severalVariables"), Pattern.compile("^(.+)\\.bounds$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/severalVariables"), Pattern.compile("^(.+)\\.constraints$"), true); } - @TestMetadata("simpleDependency.bounds") + @TestMetadata("simpleDependency.constraints") public void testSimpleDependency() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/simpleDependency.bounds"); + String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/simpleDependency.constraints"); doTest(fileName); } } @@ -184,24 +184,24 @@ public class ConstraintSystemTestGenerated extends AbstractConstraintSystemTest @RunWith(JUnit3RunnerWithInners.class) public static class Variance extends AbstractConstraintSystemTest { public void testAllFilesPresentInVariance() throws Exception { - JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/variance"), Pattern.compile("^(.+)\\.bounds$"), true); + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/variance"), Pattern.compile("^(.+)\\.constraints$"), true); } - @TestMetadata("consumer.bounds") + @TestMetadata("consumer.constraints") public void testConsumer() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/variance/consumer.bounds"); + String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/variance/consumer.constraints"); doTest(fileName); } - @TestMetadata("invariant.bounds") + @TestMetadata("invariant.constraints") public void testInvariant() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/variance/invariant.bounds"); + String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/variance/invariant.constraints"); doTest(fileName); } - @TestMetadata("producer.bounds") + @TestMetadata("producer.constraints") public void testProducer() throws Exception { - String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/variance/producer.bounds"); + String fileName = JetTestUtils.navigationMetadata("compiler/testData/constraintSystem/variance/producer.constraints"); doTest(fileName); } } diff --git a/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt b/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt index bd33facd22e..a8002afcd25 100644 --- a/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt +++ b/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt @@ -158,7 +158,7 @@ fun main(args: Array) { } testClass(javaClass()) { - model("constraintSystem", extension = "bounds") + model("constraintSystem", extension = "constraints") } testClass(javaClass()) {