[Spec tests] Add tests for prefix-decrement-expression

This commit is contained in:
anastasiia.spaseeva
2019-12-23 15:18:47 +03:00
parent 01a4562076
commit a8af3dc3c9
16 changed files with 706 additions and 10 deletions
@@ -0,0 +1,30 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-213
* PLACE: expressions, prefix-expressions, prefix-decrement-expression -> paragraph 1 -> sentence 1
* RELEVANT PLACES: expressions, prefix-expressions, prefix-decrement-expression -> paragraph 5 -> sentence 1
* overloadable-operators -> paragraph 4 -> sentence 1
* statements, assignments -> paragraph 3 -> sentence 1
* NUMBER: 1
* DESCRIPTION: A prefix decrement expression is an expression which uses the prefix form of operator --
*/
fun box(): String {
var a = A()
val res: A = --a
return if (a.i == -1) "OK"
else "NOK"
}
class A() {
var i = 0
operator fun dec(): A {
this.i--
return this
}
}
@@ -0,0 +1,31 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-213
* PLACE: expressions, prefix-expressions, prefix-decrement-expression -> paragraph 1 -> sentence 1
* RELEVANT PLACES: expressions, prefix-expressions, prefix-decrement-expression -> paragraph 5 -> sentence 1
* overloadable-operators -> paragraph 4 -> sentence 1
* statements, assignments -> paragraph 3 -> sentence 1
* NUMBER: 2
* DESCRIPTION:
*/
fun box(): String {
var a = A()
val res = (--a).i
return if (res == -1 && a.i == -1)
"OK"
else "NOK"
}
open class A() {
var i = 0
open operator fun dec(): A {
this.i--
return this
}
}
@@ -0,0 +1,34 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-213
* PLACE: expressions, prefix-expressions, prefix-decrement-expression -> paragraph 4 -> sentence 1
* RELEVANT PLACES: statements, assignments -> paragraph 3 -> sentence 3
* NUMBER: 1
* DESCRIPTION: check for a prefix increment expression --A expression A must be an assignable expression (an indexing expression)
*/
fun box(): String {
val arr = arrayOf(A(), A(), A())
val a = --arr[0]
val b = (--arr[2]).i
return if (arr[0].i == -1 && a.i == -1 && arr[1].i == 0 && arr[2].i == -1 && b == -1)
"OK"
else "NOK"
}
class A() {
var i = 0
operator fun dec(): A {
this.i--
return this
}
}
@@ -0,0 +1,35 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-213
* PLACE: expressions, prefix-expressions, prefix-decrement-expression -> paragraph 4 -> sentence 1
* RELEVANT PLACES: statements, assignments -> paragraph 3 -> sentence 2
* NUMBER: 2
* DESCRIPTION: check for a prefix decrement expression --A expression A must be an assignable expression (a navigation expression referring to a mutable property)
*/
fun box(): String {
var b = B()
--b.a
return if (b.a.i == -1)
"OK"
else "NOK"
}
class A() {
var i = 0
operator fun dec(): A {
this.i--
return this
}
}
class B() {
var a: A = A()
}
@@ -0,0 +1,40 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-213
* PLACE: expressions, prefix-expressions, prefix-decrement-expression -> paragraph 5 -> sentence 1
* NUMBER: 1
* DESCRIPTION: check the result of dec() is assigned to A, the return type of inc must be a subtype of A.
*/
fun box(): String {
var res = BDecrement(1)
val res1: Any = --res
return if (res1 is BDecrement && res.i == -1 && res.j == 0 && res1.i == -1 && res1.j == 0) {
val res2: Any? = --res
if (res2 is BDecrement && res.i == -2 && res.j == -1 && res2.i == -2 && res2.j == -1)
"OK"
else "NOK"
} else
"NOK"
}
data class BDecrement(var j: Int) : ADecrement() {
override operator fun dec(): BDecrement {
super.dec()
this.j -= 1
return this
}
}
open class ADecrement() {
var i = 0
open operator fun dec(): ADecrement {
this.i -= 1
return this
}
}
@@ -0,0 +1,31 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-213
* PLACE: expressions, prefix-expressions, prefix-decrement-expression -> paragraph 6 -> sentence 1
* RELEVANT PLACES: expressions, prefix-expressions, prefix-decrement-expression -> paragraph 5 -> sentence 1
* overloadable-operators -> paragraph 4 -> sentence 1
* statements, assignments -> paragraph 3 -> sentence 1
* NUMBER: 1
* DESCRIPTION:
*/
fun box(): String {
var a = A()
val res: Any? = --a
return if (res is A) "OK"
else "NOK"
}
class A() {
var i = 0
operator fun dec(): A {
this.i--
return this
}
}
@@ -0,0 +1,34 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-213
* PLACE: expressions, prefix-expressions, prefix-decrement-expression -> paragraph 6 -> sentence 1
* RELEVANT PLACES: expressions, prefix-expressions, prefix-decrement-expression -> paragraph 5 -> sentence 1
* overloadable-operators -> paragraph 4 -> sentence 1
* NUMBER: 2
* DESCRIPTION:
*/
fun box(): String {
var a = A()
val res: Any? = --a
return if (res is B) "OK"
else "NOK"
}
open class A() {
var i = 0
open operator fun dec(): B {
var b = B()
b.i = this.i
b.i--
return b
}
}
class B() : A() {}
@@ -0,0 +1,96 @@
{
"6": {
"pos": {
"1": [
{
"specVersion": "0.1-213",
"casesNumber": 0,
"description": "",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-213",
"casesNumber": 0,
"description": "",
"unexpectedBehaviour": false
}
]
}
},
"5": {
"pos": {
"1": [
{
"specVersion": "0.1-213",
"casesNumber": 0,
"description": "",
"path": "compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-6/pos/1.2.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-213",
"casesNumber": 0,
"description": "",
"path": "compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-6/pos/1.1.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-213",
"casesNumber": 0,
"description": "",
"path": "compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-1/pos/1.2.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-213",
"casesNumber": 0,
"description": "A prefix decrement expression is an expression which uses the prefix form of operator --",
"path": "compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-1/pos/1.1.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-213",
"casesNumber": 0,
"description": "check the result of dec() is assigned to A, the return type of inc must be a subtype of A.",
"unexpectedBehaviour": false
}
]
}
},
"1": {
"pos": {
"1": [
{
"specVersion": "0.1-213",
"casesNumber": 0,
"description": "",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-213",
"casesNumber": 0,
"description": "A prefix decrement expression is an expression which uses the prefix form of operator --",
"unexpectedBehaviour": false
}
]
}
},
"4": {
"pos": {
"1": [
{
"specVersion": "0.1-213",
"casesNumber": 0,
"description": "check for a prefix decrement expression --A expression A must be an assignable expression (a navigation expression referring to a mutable property)",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-213",
"casesNumber": 0,
"description": "check for a prefix increment expression --A expression A must be an assignable expression (an indexing expression)",
"unexpectedBehaviour": false
}
]
}
}
}
@@ -8,6 +8,13 @@
"description": "check for a prefix increment expression ++A expression A must be an assignable expression (a navigation expression referring to a mutable property)",
"path": "compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression/p-4/pos/1.2.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-213",
"casesNumber": 0,
"description": "check for a prefix decrement expression --A expression A must be an assignable expression (a navigation expression referring to a mutable property)",
"path": "compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-4/pos/1.2.kt",
"unexpectedBehaviour": false
}
],
"3": [
@@ -17,6 +24,13 @@
"description": "check for a prefix increment expression ++A expression A must be an assignable expression (an indexing expression)",
"path": "compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression/p-4/pos/1.1.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-213",
"casesNumber": 0,
"description": "check for a prefix increment expression --A expression A must be an assignable expression (an indexing expression)",
"path": "compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-4/pos/1.1.kt",
"unexpectedBehaviour": false
}
]
}
@@ -0,0 +1,44 @@
// !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-213
* PLACE: expressions, prefix-expressions, prefix-decrement-expression -> paragraph 4 -> sentence 1
* RELEVANT PLACES: statements, assignments -> paragraph 3 -> sentence 2
* NUMBER: 1
* DESCRIPTION: check unsafe prefix decrement expression call for an assignable expression
*/
class A() {
var i = 0
operator fun dec(): A {
this.i--
return this
}
}
// TESTCASE NUMBER: 1
fun case1() {
var b: Case1? = Case1()
<!UNSAFE_CALL!>--<!>b?.a
}
class Case1() {
var a: A = A()
}
// TESTCASE NUMBER: 2
fun case2() {
var b= Case2()
--<!VAL_REASSIGNMENT!>b.a<!>
}
class Case2() {
val a = A()
}
@@ -0,0 +1,47 @@
// !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-213
* PLACE: expressions, prefix-expressions, prefix-decrement-expression -> paragraph 5 -> sentence 2
* NUMBER: 1
* DESCRIPTION: check as the result of dec is assigned to A, the return type of inc must be a subtype of A.
*/
// TESTCASE NUMBER: 1
fun case1() {
var a = Case1()
val res: Any? = <!RESULT_TYPE_MISMATCH!>++<!>a
}
class Case1() {
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun inc(): B {
TODO()
}
}
class B() {}
// TESTCASE NUMBER: 2
fun case2() {
var a = Case2()
val res: Any? = <!RESULT_TYPE_MISMATCH!>++<!>a
}
class Case2() : C() {
var i = 0
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun inc(): C {
TODO()
}
}
open class C() {}
@@ -0,0 +1,26 @@
{
"4": {
"neg": {
"1": [
{
"specVersion": "0.1-213",
"casesNumber": 2,
"description": "check unsafe prefix decrement expression call for an assignable expression",
"unexpectedBehaviour": false
}
]
}
},
"5": {
"neg": {
"2": [
{
"specVersion": "0.1-213",
"casesNumber": 2,
"description": "check as the result of dec is assigned to A, the return type of inc must be a subtype of A.",
"unexpectedBehaviour": false
}
]
}
}
}
@@ -15,13 +15,13 @@
fun case1() {
var a = Case1()
val res: Any? = <!RESULT_TYPE_MISMATCH!>++<!>a
val res: Any? = <!RESULT_TYPE_MISMATCH!>--<!>a
}
class Case1() {
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun inc(): B {
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun dec(): B {
TODO()
}
}
@@ -32,13 +32,13 @@ class B() {}
fun case2() {
var a = Case2()
val res: Any? = <!RESULT_TYPE_MISMATCH!>++<!>a
val res: Any? = <!RESULT_TYPE_MISMATCH!>--<!>a
}
class Case2() : C() {
var i = 0
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun inc(): C {
<!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun dec(): C {
TODO()
}
@@ -8,6 +8,13 @@
"description": "check unsafe prefix increment expression call for an assignable expression",
"path": "compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-increment-expression/p-4/neg/1.1.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-213",
"casesNumber": 2,
"description": "check unsafe prefix decrement expression call for an assignable expression",
"path": "compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-decrement-expression/p-4/neg/1.1.kt",
"unexpectedBehaviour": false
}
]
}
@@ -2004,6 +2004,81 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-decrement-expression")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Prefix_decrement_expression extends AbstractDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInPrefix_decrement_expression() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-decrement-expression"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-decrement-expression/p-4")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class P_4 extends AbstractDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInP_4() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-decrement-expression/p-4"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-decrement-expression/p-4/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/expressions/prefix-expressions/prefix-decrement-expression/p-4/neg/1.1.kt");
}
public void testAllFilesPresentInNeg() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-decrement-expression/p-4/neg"), Pattern.compile("^(.+)\\.kt$"), true);
}
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-decrement-expression/p-5")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class P_5 extends AbstractDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInP_5() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-decrement-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-decrement-expression/p-5/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("2.1.kt")
public void test2_1() throws Exception {
runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-decrement-expression/p-5/neg/2.1.kt");
}
public void testAllFilesPresentInNeg() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-decrement-expression/p-5/neg"), Pattern.compile("^(.+)\\.kt$"), true);
}
}
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions/prefix-increment-expression")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -25,7 +25,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
}
public void testAllFilesPresentInBox() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), true, "helpers", "templates", "linked/declarations", "linked/statements", "linked/expressions/equality-expressions/reference-equality-expressions/p-1/neg", "linked/expressions/built-in-types-and-their-semantics/kotlin.unit/p-1/neg", "linked/expressions/prefix-expressions/prefix-increment-expression/p-1/neg");
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), true, "helpers", "templates", "linked/declarations", "linked/statements", "linked/expressions/equality-expressions/reference-equality-expressions/p-1/neg", "linked/expressions/built-in-types-and-their-semantics/kotlin.unit/p-1/neg");
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked")
@@ -37,7 +37,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
}
public void testAllFilesPresentInLinked() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked"), Pattern.compile("^(.+)\\.kt$"), true, "declarations", "statements", "expressions/equality-expressions/reference-equality-expressions/p-1/neg", "expressions/built-in-types-and-their-semantics/kotlin.unit/p-1/neg", "expressions/prefix-expressions/prefix-increment-expression/p-1/neg");
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked"), Pattern.compile("^(.+)\\.kt$"), true, "declarations", "statements", "expressions/equality-expressions/reference-equality-expressions/p-1/neg", "expressions/built-in-types-and-their-semantics/kotlin.unit/p-1/neg");
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions")
@@ -49,7 +49,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
}
public void testAllFilesPresentInExpressions() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions"), Pattern.compile("^(.+)\\.kt$"), true, "equality-expressions/reference-equality-expressions/p-1/neg", "built-in-types-and-their-semantics/kotlin.unit/p-1/neg", "prefix-expressions/prefix-increment-expression/p-1/neg");
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions"), Pattern.compile("^(.+)\\.kt$"), true, "equality-expressions/reference-equality-expressions/p-1/neg", "built-in-types-and-their-semantics/kotlin.unit/p-1/neg");
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/additive-expression")
@@ -1490,7 +1490,159 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
}
public void testAllFilesPresentInPrefix_expressions() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions"), Pattern.compile("^(.+)\\.kt$"), true, "prefix-increment-expression/p-1/neg");
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Prefix_decrement_expression extends AbstractBlackBoxCodegenTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInPrefix_decrement_expression() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-1")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class P_1 extends AbstractBlackBoxCodegenTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInP_1() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-1/pos")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Pos extends AbstractBlackBoxCodegenTestSpec {
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/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-1/pos/1.1.kt");
}
@TestMetadata("1.2.kt")
public void test1_2() throws Exception {
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-1/pos/1.2.kt");
}
public void testAllFilesPresentInPos() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), true);
}
}
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-4")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class P_4 extends AbstractBlackBoxCodegenTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInP_4() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-4"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-4/pos")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Pos extends AbstractBlackBoxCodegenTestSpec {
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/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-4/pos/1.1.kt");
}
@TestMetadata("1.2.kt")
public void test1_2() throws Exception {
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-4/pos/1.2.kt");
}
public void testAllFilesPresentInPos() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), true);
}
}
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-5")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class P_5 extends AbstractBlackBoxCodegenTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInP_5() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-5/pos")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Pos extends AbstractBlackBoxCodegenTestSpec {
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/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-5/pos/1.1.kt");
}
public void testAllFilesPresentInPos() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), true);
}
}
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-6")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class P_6 extends AbstractBlackBoxCodegenTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInP_6() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-6"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-6/pos")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Pos extends AbstractBlackBoxCodegenTestSpec {
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/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-6/pos/1.1.kt");
}
@TestMetadata("1.2.kt")
public void test1_2() throws Exception {
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-6/pos/1.2.kt");
}
public void testAllFilesPresentInPos() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-decrement-expression/p-6/pos"), Pattern.compile("^(.+)\\.kt$"), true);
}
}
}
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression")
@@ -1502,7 +1654,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
}
public void testAllFilesPresentInPrefix_increment_expression() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression"), Pattern.compile("^(.+)\\.kt$"), true, "p-1/neg");
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression/p-1")
@@ -1514,7 +1666,7 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
}
public void testAllFilesPresentInP_1() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), true, "neg");
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression/p-1"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions/prefix-increment-expression/p-1/pos")