Skip to content

Commit cc3d0e4

Browse files
committed
Change API
1 parent 9d8c7e8 commit cc3d0e4

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

src/jvm/main/org/jetbrains/kotlinx/lincheck/Lincheck.kt

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
* with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
99
*/
1010

11+
@file:JvmName("Lincheck")
12+
1113
package org.jetbrains.kotlinx.lincheck
1214

1315
import org.jetbrains.kotlinx.lincheck.execution.*
@@ -31,19 +33,9 @@ annotation class ExperimentalModelCheckingAPI
3133
* @param block lambda which body will be a target for the interleavings exploration.
3234
*/
3335
@ExperimentalModelCheckingAPI
36+
@JvmOverloads
3437
fun runConcurrentTest(
3538
invocations: Int = DEFAULT_INVOCATIONS_COUNT,
36-
block: () -> Unit // TODO: should we keep only the `Runnable` options?
37-
) = runConcurrentTestImpl(invocations, block)
38-
39-
@ExperimentalModelCheckingAPI
40-
fun runConcurrentTest(
41-
block: Runnable
42-
) = runConcurrentTestImpl(DEFAULT_INVOCATIONS_COUNT, block)
43-
44-
@ExperimentalModelCheckingAPI
45-
fun runConcurrentTest(
46-
invocations: Int,
4739
block: Runnable
4840
) = runConcurrentTestImpl(invocations, block)
4941

src/jvm/test/org/jetbrains/kotlinx/lincheck_test/gpmc/JavaAPITest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import java.util.concurrent.ConcurrentLinkedDeque;
1616
import java.util.concurrent.atomic.AtomicInteger;
1717

18-
import static org.jetbrains.kotlinx.lincheck.LincheckKt.runConcurrentTest;
18+
import static org.jetbrains.kotlinx.lincheck.Lincheck.runConcurrentTest;
1919
import static org.junit.Assert.assertFalse;
2020

2121
public class JavaAPITest {

0 commit comments

Comments
 (0)