Skip to content

Commit

Permalink
Merge pull request #1182 from armanbilge/topic/native-factors-scalach…
Browse files Browse the repository at this point in the history
…eck-suite

Reduce min tests for native in various scalacheck suites
  • Loading branch information
armanbilge authored Jun 17, 2022
2 parents d370e95 + f2fca72 commit e110f6e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ import MathContext.{DECIMAL128, DECIMAL64}

class AlgebraicScalaCheckSuite extends munit.ScalaCheckSuite {

override def scalaCheckTestParameters =
if (sys.props.get("java.vm.name").contains("Scala Native"))
// Native is stupidly slow for this suite
super.scalaCheckTestParameters.withMinSuccessfulTests(5)
else super.scalaCheckTestParameters

def approximation(approx0: Algebraic, scale: Int, actual: BigDecimal): Unit = {
val error = BigDecimal(10).pow(-scale)
val approx = approx0.toBigDecimal(scale, RoundingMode.HALF_EVEN)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ import org.scalacheck.Prop

class PolynomialScalaCheckSuite extends munit.ScalaCheckSuite {

override def scalaCheckTestParameters =
if (sys.props.get("java.vm.name").contains("Scala Native"))
// Native is stupidly slow for this suite
super.scalaCheckTestParameters.withMinSuccessfulTests(5)
else super.scalaCheckTestParameters

import PolynomialSetup._

val ebd = Eq[BigDecimal]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ import org.scalacheck.Prop._

class QuaternionScalaCheckSuite extends munit.ScalaCheckSuite {

override def scalaCheckTestParameters =
if (sys.props.get("java.vm.name").contains("Scala Native"))
// Native is stupidly slow for this suite
super.scalaCheckTestParameters.withMinSuccessfulTests(5)
else super.scalaCheckTestParameters

type H = Quaternion[Real]
val zero = Quaternion.zero[Real]
val one = Quaternion.one[Real]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ import org.scalacheck.Prop._

class FactorsScalaCheckSuite extends munit.ScalaCheckSuite {

override def scalaCheckTestParameters =
if (sys.props.get("java.vm.name").contains("Scala Native"))
// Native is stupidly slow for this suite
super.scalaCheckTestParameters.withMinSuccessfulTests(5)
else super.scalaCheckTestParameters

implicit val arbitraryFactors: Arbitrary[Factors] =
Arbitrary(arbitrary[SafeLong].map(n => Factors(n)))

Expand Down

0 comments on commit e110f6e

Please sign in to comment.