Add generated tests for collections/java streams
This commit is contained in:
committed by
Yan Zhulanow
parent
cf2c2ed802
commit
d4795c0e5d
@@ -78,6 +78,8 @@ import org.jetbrains.kotlin.idea.conversion.copy.AbstractTextJavaToKotlinCopyPas
|
||||
import org.jetbrains.kotlin.idea.coverage.AbstractKotlinCoverageOutputFilesTest
|
||||
import org.jetbrains.kotlin.idea.debugger.*
|
||||
import org.jetbrains.kotlin.idea.debugger.evaluate.*
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.exec.AbstractCollectionTraceTestCase
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.exec.AbstractJavaStreamTraceTestCase
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.exec.AbstractSequenceTraceTestCase
|
||||
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToDecompiledLibraryTest
|
||||
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToLibrarySourceTest
|
||||
@@ -646,11 +648,21 @@ fun main(args: Array<String>) {
|
||||
model("debugger/fileRanking")
|
||||
}
|
||||
|
||||
// Not supported yet
|
||||
testClass<AbstractJavaStreamTraceTestCase> {
|
||||
// model("debugger/tinyApp/src/streams/java")
|
||||
}
|
||||
|
||||
testClass<AbstractSequenceTraceTestCase> {
|
||||
// We need to implement mapping logic for terminal operations
|
||||
model("debugger/tinyApp/src/streams/sequence", excludeDirs = listOf("terminal"))
|
||||
}
|
||||
|
||||
// Not supported yet
|
||||
testClass<AbstractCollectionTraceTestCase> {
|
||||
// model("debugger/tinyApp/src/streams/collection")
|
||||
}
|
||||
|
||||
testClass<AbstractStubBuilderTest> {
|
||||
model("stubs", extension = "kt")
|
||||
}
|
||||
|
||||
Generated
+22
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||
* that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.idea.debugger.sequence.exec;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TargetBackend;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class CollectionTraceTestCaseGenerated extends AbstractCollectionTraceTestCase {
|
||||
}
|
||||
Generated
+22
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||
* that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.idea.debugger.sequence.exec;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TargetBackend;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class JavaStreamTraceTestCaseGenerated extends AbstractJavaStreamTraceTestCase {
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package org.jetbrains.kotlin.idea.debugger.sequence.exec.collection
|
||||
|
||||
import org.junit.Ignore
|
||||
|
||||
/**
|
||||
* @author Vitaliy.Bibaev
|
||||
*/
|
||||
@Ignore("enable to test collection transform operations")
|
||||
class ChecksTest : CollectionTestCase("checks") {
|
||||
fun testAllMatchFalse() {
|
||||
doTestWithResult()
|
||||
}
|
||||
|
||||
fun testAllMatchTrue() {
|
||||
doTestWithResult()
|
||||
}
|
||||
}
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package org.jetbrains.kotlin.idea.debugger.sequence.exec.collection
|
||||
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.exec.KotlinTraceEvaluationTestCase
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.lib.collections.KotlinCollectionSupportProvider
|
||||
import com.intellij.debugger.streams.lib.LibrarySupportProvider
|
||||
|
||||
/**
|
||||
* @author Vitaliy.Bibaev
|
||||
*/
|
||||
abstract class CollectionTestCase(private val packageName: String) : KotlinTraceEvaluationTestCase() {
|
||||
override val appName: String = "collection"
|
||||
override val librarySupport: LibrarySupportProvider = KotlinCollectionSupportProvider()
|
||||
|
||||
override fun createLocalProcess(className: String) = super.createLocalProcess("$packageName.$className")
|
||||
|
||||
protected fun doTestWithResult() = doTest(false)
|
||||
}
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package org.jetbrains.kotlin.idea.debugger.sequence.exec.collection
|
||||
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.exec.collection.CollectionTestCase
|
||||
import org.junit.Ignore
|
||||
|
||||
/**
|
||||
* @author Vitaliy.Bibaev
|
||||
*/
|
||||
@Ignore("enable to test collection transform operations")
|
||||
class DifferentSourceTest : CollectionTestCase("source") {
|
||||
fun testCollectionAsSource() = doTestWithResult()
|
||||
fun testStringAsSource() = doTestWithResult()
|
||||
fun testArrayAsSource() = doTestWithResult()
|
||||
fun testPrimitiveArrayAsSource() = doTestWithResult()
|
||||
}
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package org.jetbrains.kotlin.idea.debugger.sequence.exec.collection
|
||||
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.exec.collection.CollectionTestCase
|
||||
import org.junit.Ignore
|
||||
|
||||
/**
|
||||
* @author Vitaliy.Bibaev
|
||||
*/
|
||||
@Ignore("enable to test collection transform operations")
|
||||
class DistinctOperationsTest : CollectionTestCase("distinct") {
|
||||
fun testDistinct() {
|
||||
doTestWithResult()
|
||||
}
|
||||
|
||||
fun testDistinctBy() {
|
||||
doTestWithResult()
|
||||
}
|
||||
}
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package org.jetbrains.kotlin.idea.debugger.sequence.exec.collection
|
||||
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.exec.collection.CollectionTestCase
|
||||
import org.junit.Ignore
|
||||
|
||||
/**
|
||||
* @author Vitaliy.Bibaev
|
||||
*/
|
||||
@Ignore("enable to test collection transform operations")
|
||||
class FilterOperationsTest : CollectionTestCase("filter") {
|
||||
fun testFilterAsIntermediate() = doTestWithResult()
|
||||
fun testFilterAsTerminal() = doTestWithResult()
|
||||
|
||||
fun testFilterPrimitive() = doTestWithResult()
|
||||
fun testFilterPrimitiveAsTermination() = doTestWithResult()
|
||||
|
||||
fun testFilterPassNothing() = doTestWithResult()
|
||||
}
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package org.jetbrains.kotlin.idea.debugger.sequence.exec.collection
|
||||
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.exec.collection.CollectionTestCase
|
||||
import org.junit.Ignore
|
||||
|
||||
/**
|
||||
* @author Vitaliy.Bibaev
|
||||
*/
|
||||
@Ignore("enable to test collection transform operations")
|
||||
class FinalOperationsTest : CollectionTestCase("final") {
|
||||
fun testAverage() {
|
||||
doTestWithResult()
|
||||
}
|
||||
}
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package org.jetbrains.kotlin.idea.debugger.sequence.exec.collection
|
||||
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.exec.collection.CollectionTestCase
|
||||
import org.junit.Ignore
|
||||
|
||||
/**
|
||||
* @author Vitaliy.Bibaev
|
||||
*/
|
||||
@Ignore("enable to test collection transform operations")
|
||||
class FlatMapOperationsTest : CollectionTestCase("flatMap") {
|
||||
fun testFlatMap() {
|
||||
doTestWithResult()
|
||||
}
|
||||
}
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package org.jetbrains.kotlin.idea.debugger.sequence.exec.collection
|
||||
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.exec.collection.CollectionTestCase
|
||||
import org.junit.Ignore
|
||||
|
||||
/**
|
||||
* @author Vitaliy.Bibaev
|
||||
*/
|
||||
@Ignore("enable to test collection transform operations")
|
||||
class GroupingOperationsTest : CollectionTestCase("grouping") {
|
||||
fun testGroupBy() {
|
||||
doTestWithResult()
|
||||
}
|
||||
}
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package org.jetbrains.kotlin.idea.debugger.sequence.exec.collection
|
||||
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.exec.collection.CollectionTestCase
|
||||
import org.junit.Ignore
|
||||
|
||||
/**
|
||||
* @author Vitaliy.Bibaev
|
||||
*/
|
||||
@Ignore("enable to test collection transform operations")
|
||||
class MapOperationsTest : CollectionTestCase("map") {
|
||||
fun testMap() {
|
||||
doTestWithResult()
|
||||
}
|
||||
|
||||
fun testMapToSameCollection() {
|
||||
doTestWithResult()
|
||||
}
|
||||
}
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package org.jetbrains.kotlin.idea.debugger.sequence.exec.collection
|
||||
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.exec.collection.CollectionTestCase
|
||||
import org.junit.Ignore
|
||||
|
||||
/**
|
||||
* @author Vitaliy.Bibaev
|
||||
*/
|
||||
@Ignore("enable to test collection transform operations")
|
||||
class MiscOperationsTest : CollectionTestCase("misc") {
|
||||
fun testIndexOf() {
|
||||
doTestWithResult()
|
||||
}
|
||||
}
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package org.jetbrains.kotlin.idea.debugger.sequence.exec.collection
|
||||
|
||||
import org.jetbrains.kotlin.idea.debugger.sequence.exec.collection.CollectionTestCase
|
||||
import org.junit.Ignore
|
||||
|
||||
/**
|
||||
* @author Vitaliy.Bibaev
|
||||
*/
|
||||
@Ignore("enable to test collection transform operations")
|
||||
class ZipOperationsTest : CollectionTestCase("zip") {
|
||||
fun testZipWithSame() {
|
||||
doTestWithResult()
|
||||
}
|
||||
|
||||
fun testZipWithGreater() {
|
||||
doTestWithResult()
|
||||
}
|
||||
|
||||
fun testZipWithLesser() {
|
||||
doTestWithResult()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user