-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1d232c8
commit 7dddf90
Showing
10 changed files
with
70 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
lincheck/src/test/java/org/jetbrains/kotlinx/lincheck/test/StateEquivalenceImplCheckTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package org.jetbrains.kotlinx.lincheck.test | ||
|
||
import org.jetbrains.kotlinx.lincheck.LinChecker | ||
import org.jetbrains.kotlinx.lincheck.annotations.Operation | ||
import org.jetbrains.kotlinx.lincheck.strategy.stress.StressCTest | ||
import org.junit.Test | ||
import java.lang.IllegalStateException | ||
import java.util.concurrent.atomic.AtomicInteger | ||
|
||
@StressCTest | ||
class StateEquivalenceImplCheckTest { | ||
private var i = AtomicInteger(0) | ||
|
||
@Operation | ||
fun incAndGet() = i.incrementAndGet() | ||
|
||
// Check that IllegalStateException is thrown if `requireStateEquivalenceImplCheck` option is true by default | ||
// and hashCode/equals methods are not implemented | ||
@Test(expected = IllegalStateException::class) | ||
fun test() = LinChecker.check(StateEquivalenceImplCheckTest::class.java) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters