[Spec tests] Add tests for inner-and-nested-type-contexts section

This commit is contained in:
anastasiia.spaseeva
2020-07-28 11:14:31 +03:00
parent d5ddb26180
commit 1801344c76
17 changed files with 729 additions and 33 deletions
@@ -9,17 +9,17 @@ package testPackCase1
fun case1(a: A, c: C) {
<!DEBUG_INFO_CALL("fqName: testPackCase1.B.plusAssign; typeCall: operator function")!>a?.b += c<!>
a?.b .<!DEBUG_INFO_CALL("fqName: testPackCase1.B.plusAssign; typeCall: operator function")!>plusAssign(c)<!>
<!DEBUG_INFO_CALL("fqName: fqName is unknown; typeCall: unresolved"), INAPPLICABLE_CANDIDATE!>a?.b += c<!>
a?.b .<!DEBUG_INFO_CALL("fqName: fqName is unknown; typeCall: unresolved")!><!INAPPLICABLE_CANDIDATE!>plusAssign<!>(c)<!>
val x = {
<!DEBUG_INFO_CALL("fqName: testPackCase1.B.plusAssign; typeCall: operator function")!>a?.b += c<!>
a?.b.<!DEBUG_INFO_CALL("fqName: testPackCase1.B.plusAssign; typeCall: operator function")!>plusAssign(c)<!>
<!DEBUG_INFO_CALL("fqName: fqName is unknown; typeCall: unresolved"), INAPPLICABLE_CANDIDATE!>a?.b += c<!>
a?.b.<!DEBUG_INFO_CALL("fqName: fqName is unknown; typeCall: unresolved")!><!INAPPLICABLE_CANDIDATE!>plusAssign<!>(c)<!>
}()
<!DEBUG_INFO_CALL("fqName: testPackCase1.B.plusAssign; typeCall: operator function")!>a?.b += { c }()<!>
<!DEBUG_INFO_CALL("fqName: fqName is unknown; typeCall: unresolved"), INAPPLICABLE_CANDIDATE!>a?.b += { c }()<!>
a?.b.<!DEBUG_INFO_CALL("fqName: testPackCase1.B.plusAssign; typeCall: operator function")!>plusAssign({ c }())<!>
a?.b.<!DEBUG_INFO_CALL("fqName: fqName is unknown; typeCall: unresolved")!><!INAPPLICABLE_CANDIDATE!>plusAssign<!>({ c }())<!>
}
class A(val b: B)
@@ -1,5 +1,28 @@
{
"2": {
"pos": {
"1": [
{
"specVersion": "0.1-464",
"casesNumber": 2,
"description": "Check of Nothing as a subtype of any type",
"path": "compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/pos/1.2.kt",
"unexpectedBehaviour": false,
"linkType": "primary",
"helpers": "checkType, functions"
}
],
"3": [
{
"specVersion": "0.1-152",
"casesNumber": 0,
"description": "Kt10811",
"path": "compiler/testData/diagnostics/tests/when/kt10811.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
}
]
},
"neg": {
"1": [
{
@@ -11,18 +34,6 @@
"linkType": "primary"
}
]
},
"pos": {
"3": [
{
"specVersion": "0.1-152",
"casesNumber": 0,
"description": "Kt10811",
"path": "compiler/testData/diagnostics/tests/when/kt10811.kt",
"unexpectedBehaviour": false,
"linkType": "primary"
}
]
}
}
}
@@ -0,0 +1,23 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION -USELESS_IS_CHECK
// SKIP_TXT
// TESTCASE NUMBER: 1
class Case1<AT>(val x: AT) {
inner class C() {
fun case1a(x: Any) {
if (x is AT) {
""
}
}
fun case1b(x: Any) {
when (x) {
is AT -> println("at")
}
}
}
}
@@ -0,0 +1,32 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION -USELESS_IS_CHECK
// SKIP_TXT
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-464
* MAIN LINK: type-system, type-contexts-and-scopes, inner-and-nested-type-contexts -> paragraph 1 -> sentence 1
* NUMBER: 1
* DESCRIPTION: type context for a nested type declaration of a parent type declaration does not include the type parameters of PD
* HELPERS: checkType
*/
// TESTCASE NUMBER: 1
class Case1<AT>(val x: AT) {
inner class C() {
fun case1a(x: Any) {
if (x is <!CANNOT_CHECK_FOR_ERASED!>AT<!>) {
""
}
}
fun case1b(x: Any) {
when (x) {
is <!CANNOT_CHECK_FOR_ERASED!>AT<!> -> println("at")
}
}
}
}
@@ -0,0 +1,42 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION -USELESS_IS_CHECK -IMPLICIT_CAST_TO_ANY
// SKIP_TXT
// TESTCASE NUMBER: 1
class Case1<AT: CharSequence>(val x: AT) {
inner class C() {
fun case1a(x: Any) {
if (x is AT) {
""
}
}
fun case1b(x: Any) = when (x) {
is AT -> println("at")
else -> ""
}
}
}
// TESTCASE NUMBER: 2
class Case2<AT: CharSequence>(val x: AT) {
inner class C() {
fun case2a(x: CharSequence) {
if (x is AT) {
""
}
}
fun case2b(x: CharSequence) {
when (x) {
is AT -> ""
}
}
}
}
@@ -0,0 +1,51 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION -USELESS_IS_CHECK -IMPLICIT_CAST_TO_ANY
// SKIP_TXT
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-464
* MAIN LINK: type-system, type-contexts-and-scopes, inner-and-nested-type-contexts -> paragraph 1 -> sentence 1
* NUMBER: 2
* DESCRIPTION: type context for a nested type declaration of a parent type declaration does not include the type parameters of PD
* HELPERS: checkType
*/
// TESTCASE NUMBER: 1
class Case1<AT: CharSequence>(val x: AT) {
inner class C() {
fun case1a(x: Any) {
if (x is <!CANNOT_CHECK_FOR_ERASED!>AT<!>) {
""
}
}
fun case1b(x: Any) = when (x) {
is <!CANNOT_CHECK_FOR_ERASED!>AT<!> -> println("at")
else -> ""
}
}
}
// TESTCASE NUMBER: 2
class Case2<AT: CharSequence>(val x: AT) {
inner class C() {
fun case2a(x: CharSequence) {
if (x is <!CANNOT_CHECK_FOR_ERASED!>AT<!>) {
""
}
}
fun case2b(x: CharSequence) {
when (x) {
is <!CANNOT_CHECK_FOR_ERASED!>AT<!> -> ""
}
}
}
}
@@ -0,0 +1,27 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
// TESTCASE NUMBER: 1
class Case1<AT>(val x: AT) {
class B(val y: AT) {
fun case1() {
val k: AT
}
}
class C() {
fun case1(x: Any) {
when (x) {
is AT -> println("at")
else -> println("else")
}
}
}
class D() {
fun case1(x: Any) : AT = TODO()
}
}
@@ -0,0 +1,35 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-464
* MAIN LINK: type-system, type-contexts-and-scopes, inner-and-nested-type-contexts -> paragraph 1 -> sentence 2
* NUMBER: 1
* DESCRIPTION: type context for a nested type declaration of a parent type declaration does not include the type parameters of PD
*/
// TESTCASE NUMBER: 1
class Case1<AT>(val x: AT) {
class B(val y: <!UNRESOLVED_REFERENCE!>AT<!>) {
fun case1() {
val k: <!UNRESOLVED_REFERENCE!>AT<!>
}
}
class C() {
fun case1(x: Any) {
when (x) {
is <!UNRESOLVED_REFERENCE!>AT<!> -> println("at")
else -> println("else")
}
}
}
class D() {
fun case1(x: Any) : <!UNRESOLVED_REFERENCE!>AT<!> = TODO()
}
}
@@ -0,0 +1,45 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION -USELESS_IS_CHECK -UNCHECKED_CAST
// SKIP_TXT
// TESTCASE NUMBER: 1
class Case1<AT>(val x: AT) {
inner class B(val y: AT) {
fun case1a(k: AT) {
k checkType { check<AT>() }
with(k) {
this checkType { check<AT>() }
}
}
fun case1b() {
val k: AT = x
k checkType { check<AT>() }
when (k) {
is AT -> {
k checkType { <!INAPPLICABLE_CANDIDATE!>check<!><AT>() }
}
}
}
fun case1c() {
val k: AT = x!!
if (k is AT) {
k checkType { <!INAPPLICABLE_CANDIDATE!>check<!><AT>() }
}
}
}
inner class D() {
fun boo(x: Any): AT = TODO()
fun case1() {
boo("") checkType { check<AT>() }
}
}
}
@@ -0,0 +1,54 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION -USELESS_IS_CHECK -UNCHECKED_CAST
// SKIP_TXT
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-464
* MAIN LINK: type-system, type-contexts-and-scopes, inner-and-nested-type-contexts -> paragraph 1 -> sentence 1
* NUMBER: 1
* DESCRIPTION: type context for a nested type declaration of a parent type declaration does not include the type parameters of PD
* HELPERS: checkType
*/
// TESTCASE NUMBER: 1
class Case1<AT>(val x: AT) {
inner class B(val y: AT) {
fun case1a(k: AT) {
k checkType { check<AT>() }
with(k) {
this checkType { check<AT>() }
}
}
fun case1b() {
val k: AT = x
k checkType { check<AT>() }
when (k) {
is AT -> {
k checkType { check<AT>() }
}
}
}
fun case1c() {
val k: AT = x!!
if (k is AT) {
k checkType { check<AT>() }
}
}
}
inner class D() {
fun boo(x: Any): AT = TODO()
fun case1() {
boo("") checkType { check<AT>() }
}
}
}
@@ -0,0 +1,65 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION -USELESS_IS_CHECK
// SKIP_TXT
// TESTCASE NUMBER: 1
class Case1<AT: CharSequence>(val x: AT) {
inner class B(val y: AT) {
fun case1a() {
val k: AT = x
if (k is AT) {
""
}
}
fun case1b() {
val k: AT = x
when (k) {
is AT -> ""
}
}
}
inner class D() {
fun boo(x: Any): AT = TODO()
fun case1() {
boo("") checkType { check<AT>() }
}
}
}
// TESTCASE NUMBER: 2
class Case2<AT: CharSequence>(val x: AT) {
inner class B(val y: AT) {
fun case2a() {
val k: AT = x
if (k is AT) {
""
}
}
fun case2b() {
val k: AT = x
when (k) {
is AT -> ""
}
}
}
inner class C() {
fun boo(x: Any): AT = TODO()
fun case2() {
boo("") checkType { check<AT>() }
}
}
}
@@ -0,0 +1,74 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION -USELESS_IS_CHECK
// SKIP_TXT
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-464
* MAIN LINK: type-system, type-contexts-and-scopes, inner-and-nested-type-contexts -> paragraph 1 -> sentence 1
* NUMBER: 2
* DESCRIPTION: type context for a nested type declaration of a parent type declaration does not include the type parameters of PD
* HELPERS: checkType
*/
// TESTCASE NUMBER: 1
class Case1<AT: CharSequence>(val x: AT) {
inner class B(val y: AT) {
fun case1a() {
val k: AT = x
if (k is AT) {
""
}
}
fun case1b() {
val k: AT = x
when (k) {
is AT -> ""
}
}
}
inner class D() {
fun boo(x: Any): AT = TODO()
fun case1() {
boo("") checkType { check<AT>() }
}
}
}
// TESTCASE NUMBER: 2
class Case2<AT: CharSequence>(val x: AT) {
inner class B(val y: AT) {
fun case2a() {
val k: AT = x
if (k is AT) {
""
}
}
fun case2b() {
val k: AT = x
when (k) {
is AT -> ""
}
}
}
inner class C() {
fun boo(x: Any): AT = TODO()
fun case2() {
boo("") checkType { check<AT>() }
}
}
}
@@ -0,0 +1,58 @@
{
"1": {
"neg": {
"2": [
{
"specVersion": "0.1-464",
"casesNumber": 1,
"description": "type context for a nested type declaration of a parent type declaration does not include the type parameters of PD",
"path": "compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/2.1.kt",
"unexpectedBehaviour": false,
"linkType": "main"
}
],
"1": [
{
"specVersion": "0.1-464",
"casesNumber": 2,
"description": "type context for a nested type declaration of a parent type declaration does not include the type parameters of PD",
"path": "compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/1.2.kt",
"unexpectedBehaviour": false,
"linkType": "main",
"helpers": "checkType"
},
{
"specVersion": "0.1-464",
"casesNumber": 1,
"description": "type context for a nested type declaration of a parent type declaration does not include the type parameters of PD",
"path": "compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/1.1.kt",
"unexpectedBehaviour": false,
"linkType": "main",
"helpers": "checkType"
}
]
},
"pos": {
"1": [
{
"specVersion": "0.1-464",
"casesNumber": 2,
"description": "type context for a nested type declaration of a parent type declaration does not include the type parameters of PD",
"path": "compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos/1.2.kt",
"unexpectedBehaviour": false,
"linkType": "main",
"helpers": "checkType"
},
{
"specVersion": "0.1-464",
"casesNumber": 1,
"description": "type context for a nested type declaration of a parent type declaration does not include the type parameters of PD",
"path": "compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos/1.1.kt",
"unexpectedBehaviour": false,
"linkType": "main",
"helpers": "checkType"
}
]
}
}
}
@@ -6,9 +6,10 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-213
* MAIN LINK: type-system, type-kinds, built-in-types, kotlin.nothing -> paragraph 1 -> sentence 2
* NUMBER: 1
* SPEC VERSION: 0.1-464
* MAIN LINK: type-system, type-kinds, built-in-types, kotlin.nothing -> paragraph 1 -> sentence 1
* PRIMARY LINKS: type-system, subtyping, subtyping-rules -> paragraph 2 -> sentence 1
* NUMBER: 2
* DESCRIPTION: Check of Nothing as a subtype of any type
* HELPERS: checkType, functions
*/
@@ -14,18 +14,16 @@
]
},
"pos": {
"2": [
"1": [
{
"specVersion": "0.1-213",
"specVersion": "0.1-464",
"casesNumber": 2,
"description": "Check of Nothing as a subtype of any type",
"path": "compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/pos/2.1.kt",
"path": "compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/pos/1.2.kt",
"unexpectedBehaviour": false,
"linkType": "main",
"helpers": "checkType, functions"
}
],
"1": [
},
{
"specVersion": "0.1-213",
"casesNumber": 2,
@@ -5684,6 +5684,96 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec {
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Type_contexts_and_scopes extends AbstractDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInType_contexts_and_scopes() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Inner_and_nested_type_contexts extends AbstractDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInInner_and_nested_type_contexts() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class P_1 extends AbstractDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInP_1() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Neg extends AbstractDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
@TestMetadata("1.1.kt")
public void test1_1() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/1.1.kt");
}
@TestMetadata("1.2.kt")
public void test1_2() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/1.2.kt");
}
@TestMetadata("2.1.kt")
public void test2_1() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/2.1.kt");
}
public void testAllFilesPresentInNeg() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Pos extends AbstractDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
@TestMetadata("1.1.kt")
public void test1_1() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos/1.1.kt");
}
@TestMetadata("1.2.kt")
public void test1_2() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos/1.2.kt");
}
public void testAllFilesPresentInPos() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
}
}
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -5812,9 +5902,9 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec {
runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/pos/1.1.kt");
}
@TestMetadata("2.1.kt")
public void test2_1() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/pos/2.1.kt");
@TestMetadata("1.2.kt")
public void test1_2() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/pos/1.2.kt");
}
public void testAllFilesPresentInPos() throws Exception {
@@ -5684,6 +5684,96 @@ public class FirDiagnosticsTestSpecGenerated extends AbstractFirDiagnosticsTestS
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Type_contexts_and_scopes extends AbstractFirDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInType_contexts_and_scopes() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Inner_and_nested_type_contexts extends AbstractFirDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInInner_and_nested_type_contexts() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class P_1 extends AbstractFirDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInP_1() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Neg extends AbstractFirDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
@TestMetadata("1.1.kt")
public void test1_1() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/1.1.kt");
}
@TestMetadata("1.2.kt")
public void test1_2() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/1.2.kt");
}
@TestMetadata("2.1.kt")
public void test2_1() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg/2.1.kt");
}
public void testAllFilesPresentInNeg() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Pos extends AbstractFirDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
@TestMetadata("1.1.kt")
public void test1_1() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos/1.1.kt");
}
@TestMetadata("1.2.kt")
public void test1_2() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos/1.2.kt");
}
public void testAllFilesPresentInPos() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/type-contexts-and-scopes/inner-and-nested-type-contexts/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
}
}
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -5812,9 +5902,9 @@ public class FirDiagnosticsTestSpecGenerated extends AbstractFirDiagnosticsTestS
runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/pos/1.1.kt");
}
@TestMetadata("2.1.kt")
public void test2_1() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/pos/2.1.kt");
@TestMetadata("1.2.kt")
public void test1_2() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/type-kinds/built-in-types/kotlin.nothing/p-1/pos/1.2.kt");
}
public void testAllFilesPresentInPos() throws Exception {