[Spec tests] Add tests for additive-expression and Multiplicative expression

This commit is contained in:
anastasiia.spaseeva
2019-12-23 14:41:40 +03:00
parent 72358aa52a
commit 01a4562076
13 changed files with 683 additions and 0 deletions
@@ -0,0 +1,43 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-218
* PLACE: expressions, additive-expression -> paragraph 2 -> sentence 1
* RELEVANT PLACES: expressions, additive-expression -> paragraph 1 -> sentence 1
* expressions, additive-expression -> paragraph 1 -> sentence 2
* expressions, additive-expression -> paragraph 3 -> sentence 1
* NUMBER: 1
* DESCRIPTION: A + B is exactly the same as A.plus(B)
*/
class A(var a: Int) {
var isCalled = false
var isCalledInt = false
operator fun plus(o: Int): A {
isCalledInt = true
a += o
return this
}
operator fun plus(o: A): A {
isCalled = true
return A(a + o.a)
}
}
fun box(): String {
val a1 = A(-1)
val a2 = A(5)
val x = a1 + a2
if (a1.isCalled && !a2.isCalled && x.a == 4) {
val a3 = A(3)
val y = a3 + 8
if (a3.isCalledInt && y.a == 11)
return "OK"
}
return "NOK"
}
@@ -0,0 +1,43 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-218
* PLACE: expressions, additive-expression -> paragraph 2 -> sentence 2
* RELEVANT PLACES: expressions, additive-expression -> paragraph 1 -> sentence 1
* expressions, additive-expression -> paragraph 1 -> sentence 2
* expressions, additive-expression -> paragraph 3 -> sentence 1
* NUMBER: 1
* DESCRIPTION: A - B is exactly the same as A.MINUS(B)
*/
class A(var a: Int) {
var isCalled = false
var isCalledInt = false
operator fun minus(o: Int): A {
isCalledInt = true
a -= o
return this
}
operator fun minus(o: A): A {
isCalled = true
return A(a - o.a)
}
}
fun box(): String {
val a1 = A(-1)
val a2 = A(5)
val x = a1 - a2
if (a1.isCalled && !a2.isCalled && x.a == -6) {
val a3 = A(3)
val y = a3 - 8
if (a3.isCalledInt && y.a == -5)
return "OK"
}
return "NOK"
}
@@ -0,0 +1,42 @@
{
"2": {
"pos": {
"2": [
{
"specVersion": "0.1-218",
"casesNumber": 0,
"description": "A - B is exactly the same as A.MINUS(B)",
"unexpectedBehaviour": false
}
],
"1": [
{
"specVersion": "0.1-218",
"casesNumber": 0,
"description": "A + B is exactly the same as A.plus(B)",
"unexpectedBehaviour": false
}
]
}
},
"1": {
"pos": {
"1": [
{
"specVersion": "0.1-218",
"casesNumber": 0,
"description": "A - B is exactly the same as A.MINUS(B)",
"path": "compiler/tests-spec/testData/codegen/box/linked/expressions/additive-expression/p-2/pos/2.1.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-218",
"casesNumber": 0,
"description": "A + B is exactly the same as A.plus(B)",
"path": "compiler/tests-spec/testData/codegen/box/linked/expressions/additive-expression/p-2/pos/1.1.kt",
"unexpectedBehaviour": false
}
]
}
}
}
@@ -0,0 +1,41 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-218
* PLACE: expressions, multiplicative-expression -> paragraph 2 -> sentence 1
* RELEVANT PLACES: expressions, multiplicative-expression -> paragraph 1 -> sentence 1
* expressions, multiplicative-expression -> paragraph 1 -> sentence 2
* NUMBER: 1
* DESCRIPTION: A * B is exactly the same as A.times(B)
*/
class A(var a: Int) {
var isCalled = false
var isCalledInt = false
operator fun times(o: Int): A {
isCalledInt = true
a *= o
return this
}
operator fun times(o: A): A {
isCalled = true
return A(a * o.a)
}
}
fun box(): String {
val a1 = A(-1)
val a2 = A(5)
val x = a1 * a2
if (a1.isCalled && !a2.isCalled && x.a == -5) {
val a3 = A(3)
val y = a3 * 2
if (a3.isCalledInt && y.a == 6)
return "OK"
}
return "NOK"
}
@@ -0,0 +1,40 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-218
* PLACE: expressions, multiplicative-expression -> paragraph 2 -> sentence 2
* RELEVANT PLACES: expressions, multiplicative-expression -> paragraph 1 -> sentence 1
* expressions, multiplicative-expression -> paragraph 1 -> sentence 2
* NUMBER: 1
* DESCRIPTION: A / B is exactly the same as A.div(B)
*/
class A(var a: Int) {
var isCalled = false
var isCalledInt = false
operator fun div(o: Int): A {
isCalledInt = true
return this
}
operator fun div(o: A): A {
isCalled = true
return this
}
}
fun box(): String {
val a1 = A(-1)
val a2 = A(5)
val x = a1 / a2
if (a1.isCalled && !a2.isCalled) {
val a3 = A(3)
val y = a3 / 2
if (a3.isCalledInt)
return "OK"
}
return "NOK"
}
@@ -0,0 +1,40 @@
// WITH_RUNTIME
/*
* KOTLIN CODEGEN BOX SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-218
* PLACE: expressions, multiplicative-expression -> paragraph 2 -> sentence 3
* RELEVANT PLACES: expressions, multiplicative-expression -> paragraph 1 -> sentence 1
* expressions, multiplicative-expression -> paragraph 1 -> sentence 2
* NUMBER: 1
* DESCRIPTION: A % B is exactly the same as A.rem(B)
*/
class A(var a: Int) {
var isCalled = false
var isCalledInt = false
operator fun rem(o: Int): A {
isCalledInt = true
return this
}
operator fun rem(o: A): A {
isCalled = true
return this
}
}
fun box(): String {
val a1 = A(-1)
val a2 = A(5)
val x = a1 % a2
if (a1.isCalled && !a2.isCalled) {
val a3 = A(3)
val y = a3 % 2
if (a3.isCalledInt)
return "OK"
}
return "NOK"
}
@@ -0,0 +1,57 @@
{
"2": {
"pos": {
"2": [
{
"specVersion": "0.1-218",
"casesNumber": 0,
"description": "A / B is exactly the same as A.div(B)",
"unexpectedBehaviour": false
}
],
"3": [
{
"specVersion": "0.1-218",
"casesNumber": 0,
"description": "A % B is exactly the same as A.rem(B)",
"unexpectedBehaviour": false
}
],
"1": [
{
"specVersion": "0.1-218",
"casesNumber": 0,
"description": "A * B is exactly the same as A.times(B)",
"unexpectedBehaviour": false
}
]
}
},
"1": {
"pos": {
"1": [
{
"specVersion": "0.1-218",
"casesNumber": 0,
"description": "A / B is exactly the same as A.div(B)",
"path": "compiler/tests-spec/testData/codegen/box/linked/expressions/multiplicative-expression/p-2/pos/2.1.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-218",
"casesNumber": 0,
"description": "A % B is exactly the same as A.rem(B)",
"path": "compiler/tests-spec/testData/codegen/box/linked/expressions/multiplicative-expression/p-2/pos/3.1.kt",
"unexpectedBehaviour": false
},
{
"specVersion": "0.1-218",
"casesNumber": 0,
"description": "A * B is exactly the same as A.times(B)",
"path": "compiler/tests-spec/testData/codegen/box/linked/expressions/multiplicative-expression/p-2/pos/1.1.kt",
"unexpectedBehaviour": false
}
]
}
}
}
@@ -0,0 +1,75 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-218
* PLACE: expressions, additive-expression -> paragraph 4 -> sentence 1
* RELEVANT PLACES: expressions, additive-expression -> paragraph 4 -> sentence 2
* NUMBER: 1
* DESCRIPTION: The return type of these functions is not restricted.
* HELPERS: checkType
*/
// TESTCASE NUMBER: 1
class Case1(var a: Int) {
operator fun minus(o: Int): Case1 { TODO() }
operator fun minus(o: Case1):Case1 { TODO() }
operator fun plus(o: Int): Case1 { TODO() }
operator fun plus(o: Case1): Case1 { TODO() }
}
fun case1() {
val a = Case1(1) + 1
val b = Case1(1) + Case1( 1)
val c = Case1(1) - 1
val d = Case1(1) - Case1( 1)
a checkType { check<Case1>() }
b checkType { check<Case1>() }
c checkType { check<Case1>() }
d checkType { check<Case1>() }
}
// TESTCASE NUMBER: 2
class Case2(var a: Int) {
operator fun minus(o: Int): Nothing? { TODO() }
operator fun minus(o: Case2):Nothing? { TODO() }
operator fun plus(o: Int): Nothing? { TODO() }
operator fun plus(o: Case2): Nothing? { TODO() }
}
fun case2() {
val a = Case2(1) + 1
val b = Case2(1) + Case2( 1)
val c = Case2(1) - 1
val d = Case2(1) - Case2( 1)
<!DEBUG_INFO_CONSTANT!>a<!> checkType { check<Nothing?>() }
<!DEBUG_INFO_CONSTANT!>b<!> checkType { check<Nothing?>() }
<!DEBUG_INFO_CONSTANT!>c<!> checkType { check<Nothing?>() }
<!DEBUG_INFO_CONSTANT!>d<!> checkType { check<Nothing?>() }
}
// TESTCASE NUMBER: 3
class Case3(var a: Int) {
operator fun minus(o: Int): Any? { TODO() }
operator fun minus(o: Case3):Any? { TODO() }
operator fun plus(o: Int): Any? { TODO() }
operator fun plus(o: Case3): Any? { TODO() }
}
fun case3() {
val a = Case3(1) + 1
val b = Case3(1) + Case3( 1)
val c = Case3(1) - 1
val d = Case3(1) - Case3( 1)
a checkType { check<Any?>() }
b checkType { check<Any?>() }
c checkType { check<Any?>() }
d checkType { check<Any?>() }
}
@@ -0,0 +1,23 @@
{
"4": {
"pos": {
"1": [
{
"specVersion": "0.1-218",
"casesNumber": 3,
"description": "The return type of these functions is not restricted.",
"unexpectedBehaviour": false
}
],
"2": [
{
"specVersion": "0.1-218",
"casesNumber": 3,
"description": "The return type of these functions is not restricted.",
"path": "compiler/tests-spec/testData/diagnostics/linked/expressions/additive-expression/p-4/pos/1.1.kt",
"unexpectedBehaviour": false
}
]
}
}
}
@@ -0,0 +1,65 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-218
* PLACE: expressions, multiplicative-expression -> paragraph 5 -> sentence 1
* RELEVANT PLACES: expressions, multiplicative-expression -> paragraph 5 -> sentence 2
* NUMBER: 1
* DESCRIPTION: The return type of these functions is not restricted.
* HELPERS: checkType
*/
// TESTCASE NUMBER: 1
class Case1(var a: Int) {
operator fun times(o: Int): Any? { TODO() }
operator fun times(o: Case1):Any? { TODO() }
operator fun div(o: Int): Any? { TODO() }
operator fun div(o: Case1): Any? { TODO() }
operator fun rem(o: Int): Any? { TODO() }
operator fun rem(o: Case1): Any? { TODO() }
}
fun case1() {
val a = Case1(1) * 1
val b = Case1(1) * Case1( 1)
val c = Case1(1) / 1
val d = Case1(1) / Case1( 1)
val e = Case1(1) % 1
val f = Case1(1) % Case1( 1)
a checkType { check<Any?>() }
b checkType { check<Any?>() }
c checkType { check<Any?>() }
d checkType { check<Any?>() }
e checkType { check<Any?>() }
f checkType { check<Any?>() }
}
// TESTCASE NUMBER: 2
class Case2(var a: Int) {
operator fun times(o: Int): Nothing? { TODO() }
operator fun times(o: Case2):Nothing? { TODO() }
operator fun div(o: Int): Nothing? { TODO() }
operator fun div(o: Case2): Nothing? { TODO() }
operator fun rem(o: Int): Nothing? { TODO() }
operator fun rem(o: Case2): Nothing? { TODO() }
}
fun case2() {
val a = Case2(1) * 1
val b = Case2(1) * Case2( 1)
val c = Case2(1) / 1
val d = Case2(1) / Case2( 1)
val e = Case2(1) % 1
val f = Case2(1) % Case2( 1)
<!DEBUG_INFO_CONSTANT!>a<!> checkType { check<Nothing?>() }
<!DEBUG_INFO_CONSTANT!>b<!> checkType { check<Nothing?>() }
<!DEBUG_INFO_CONSTANT!>c<!> checkType { check<Nothing?>() }
<!DEBUG_INFO_CONSTANT!>d<!> checkType { check<Nothing?>() }
<!DEBUG_INFO_CONSTANT!>e<!> checkType { check<Nothing?>() }
<!DEBUG_INFO_CONSTANT!>f<!> checkType { check<Nothing?>() }
}
@@ -0,0 +1,23 @@
{
"5": {
"pos": {
"1": [
{
"specVersion": "0.1-218",
"casesNumber": 2,
"description": "The return type of these functions is not restricted.",
"unexpectedBehaviour": false
}
],
"2": [
{
"specVersion": "0.1-218",
"casesNumber": 2,
"description": "The return type of these functions is not restricted.",
"path": "compiler/tests-spec/testData/diagnostics/linked/expressions/multiplicative-expression/p-5/pos/1.1.kt",
"unexpectedBehaviour": false
}
]
}
}
}
@@ -455,6 +455,50 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions"), Pattern.compile("^(.+)\\.kt$"), true, "function-literals", "built-in-types-and-their-semantics/kotlin.nothing-1/p-1/neg");
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/additive-expression")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Additive_expression extends AbstractDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInAdditive_expression() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/additive-expression"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/additive-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/additive-expression/p-4"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/additive-expression/p-4/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/expressions/additive-expression/p-4/pos/1.1.kt");
}
public void testAllFilesPresentInPos() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/additive-expression/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), true);
}
}
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/built-in-types-and-their-semantics")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -1904,6 +1948,50 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec {
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/multiplicative-expression")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Multiplicative_expression extends AbstractDiagnosticsTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInMultiplicative_expression() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/multiplicative-expression"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/multiplicative-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/multiplicative-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/multiplicative-expression/p-5/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/expressions/multiplicative-expression/p-5/pos/1.1.kt");
}
public void testAllFilesPresentInPos() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/multiplicative-expression/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), true);
}
}
}
}
@TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/prefix-expressions")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -52,6 +52,55 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
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");
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/additive-expression")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Additive_expression extends AbstractBlackBoxCodegenTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInAdditive_expression() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/additive-expression"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/additive-expression/p-2")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class P_2 extends AbstractBlackBoxCodegenTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInP_2() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/additive-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/additive-expression/p-2/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/additive-expression/p-2/pos/1.1.kt");
}
@TestMetadata("2.1.kt")
public void test2_1() throws Exception {
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/additive-expression/p-2/pos/2.1.kt");
}
public void testAllFilesPresentInPos() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/additive-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), true);
}
}
}
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/built-in-types-and-their-semantics")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -1378,6 +1427,60 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes
}
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/multiplicative-expression")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Multiplicative_expression extends AbstractBlackBoxCodegenTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInMultiplicative_expression() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/multiplicative-expression"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/multiplicative-expression/p-2")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class P_2 extends AbstractBlackBoxCodegenTestSpec {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInP_2() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/multiplicative-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/multiplicative-expression/p-2/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/multiplicative-expression/p-2/pos/1.1.kt");
}
@TestMetadata("2.1.kt")
public void test2_1() throws Exception {
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/multiplicative-expression/p-2/pos/2.1.kt");
}
@TestMetadata("3.1.kt")
public void test3_1() throws Exception {
runTest("compiler/tests-spec/testData/codegen/box/linked/expressions/multiplicative-expression/p-2/pos/3.1.kt");
}
public void testAllFilesPresentInPos() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/expressions/multiplicative-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), true);
}
}
}
}
@TestMetadata("compiler/tests-spec/testData/codegen/box/linked/expressions/prefix-expressions")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)