Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for more RetryPolicy functions
Closes #11 Source * Replace Stream iterate+apply w/ Function.chain * Optimize RetryPolicy.constantDelay Test * Add tests for more RetryPolicy functions * Add PositiveInt * Formatting
- Loading branch information
Showing
4 changed files
with
143 additions
and
67 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package rebind | ||
|
||
import org.scalacheck._ | ||
import org.scalacheck.Arbitrary._ | ||
|
||
final class PositiveByte private(val byte: Byte) extends AnyVal { | ||
def int: Int = byte.toInt | ||
} | ||
|
||
object PositiveByte { | ||
implicit val positiveByteArbitrary: Arbitrary[PositiveByte] = | ||
Arbitrary(Gen.chooseNum[Byte](1, Byte.MaxValue).map(b => new PositiveByte(b))) | ||
} | ||
|
||
final class PositiveInt private(val int: Int) extends AnyVal | ||
|
||
object PositiveInt { | ||
implicit val positiveIntArbitrary: Arbitrary[PositiveInt] = | ||
Arbitrary(Gen.chooseNum[Int](1, Int.MaxValue).map(i => new PositiveInt(i))) | ||
} |
This file was deleted.
Oops, something went wrong.
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