forked from typelevel/scalacheck
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes typelevel#290 (deadlock under 2.12 during property initialization)
- Loading branch information
Showing
3 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
jvm/src/test/scala/org/scalacheck/LazyPropertiesSpecification.scala
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,26 @@ | ||
/*-------------------------------------------------------------------------*\ | ||
** ScalaCheck ** | ||
** Copyright (c) 2007-2016 Rickard Nilsson. All rights reserved. ** | ||
** http://www.scalacheck.org ** | ||
** ** | ||
** This software is released under the terms of the Revised BSD License. ** | ||
** There is NO WARRANTY. See the file LICENSE for the full text. ** | ||
\*------------------------------------------------------------------------ */ | ||
|
||
package org.scalacheck | ||
|
||
object LazyPropertiesSpecification extends Properties("Properties.lazy registration") { | ||
|
||
property("properties registered lazily") = { | ||
var evaluated = false | ||
val p = new Properties("P") { | ||
property("p") = { | ||
evaluated = true | ||
Prop.proved | ||
} | ||
} | ||
evaluated == false | ||
} | ||
|
||
} | ||
|
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