1 // 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.
2 package com.intellij.debugger.streams.exec.streamex
4 import com.intellij.debugger.streams.exec.LibraryTraceExecutionTestCase
5 import com.intellij.debugger.streams.lib.LibrarySupportProvider
6 import com.intellij.debugger.streams.lib.impl.StreamExLibrarySupportProvider
9 * @author Vitaliy.Bibaev
11 abstract class StreamExTestCase : LibraryTraceExecutionTestCase("streamex-0.6.5.jar") {
12 private companion object {
13 const val STREAM_EX_REFLECTION_WARNING_MESSAGE =
14 "WARNING: An illegal reflective access operation has occurred\n" +
15 "WARNING: Illegal reflective access by one.util.streamex.StreamExInternals (file:!LIBRARY_JAR!) to field " +
16 "java.util.stream.AbstractPipeline.sourceSpliterator\n" +
17 "WARNING: Please consider reporting this to the maintainers of one.util.streamex.StreamExInternals\n" +
18 "WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations\n" +
19 "WARNING: All illegal access operations will be denied in a future release\n"
22 protected abstract val packageName: String
24 override fun getLibrarySupportProvider(): LibrarySupportProvider {
25 return StreamExLibrarySupportProvider()
28 override fun replaceAdditionalInOutput(str: String): String {
29 return super.replaceAdditionalInOutput(str)
30 .replace("file:/!LIBRARY_JAR!", "file:!LIBRARY_JAR!")
31 .replace(STREAM_EX_REFLECTION_WARNING_MESSAGE, "")
34 private val className: String
35 get() = packageName + "." + getTestName(false)
37 final override fun getTestAppRelativePath(): String = "streamex"
39 protected fun doStreamExVoidTest() = doTest(true, className)
40 protected fun doStreamExWithResultTest() = doTest(false, className)