File tree Expand file tree Collapse file tree 5 files changed +60
-2
lines changed
native/src/main/scala/org/scalacheck
src/test/scala/org/scalacheck Expand file tree Collapse file tree 5 files changed +60
-2
lines changed Original file line number Diff line number Diff line change 11language : scala
2+ dist : trusty
23script : ./tools/travis-script.sh
34after_success : ./tools/travis-deploy.sh
45branches :
3031 - PLATFORM=js SBT_PARALLEL=true WORKERS=1 DEPLOY=true
3132 - PLATFORM=js SBT_PARALLEL=true WORKERS=1 DEPLOY=true SCALAJS_VERSION=1.0.0-M1
3233sudo : false
34+
35+ matrix :
36+ include :
37+ - scala : 2.11.11
38+ before_script :
39+ - curl https://raw.githubusercontent.com/scala-native/scala-native/21539aa97947f767afcd85b5c2fb3c0262b2d301/bin/travis_setup.sh | bash -x
40+ sudo : required
41+ env : PLATFORM=native SBT_PARALLEL=true WORKERS=1 DEPLOY=true
Original file line number Diff line number Diff line change @@ -129,3 +129,14 @@ lazy val jvm = project.in(file("jvm"))
129129 .settings(
130130 libraryDependencies += " org.scala-sbt" % " test-interface" % " 1.0"
131131 )
132+
133+ lazy val native = project.in(file(" native" ))
134+ .settings(sharedSettings : _* )
135+ .settings(
136+ doc in Compile := (doc in Compile in jvm).value,
137+ scalaVersion := " 2.11.11" ,
138+ libraryDependencies ++= Seq (
139+ " org.scala-native" %% " test-interface_native0.3" % " 0.3.1"
140+ )
141+ )
142+ .enablePlugins(ScalaNativePlugin )
Original file line number Diff line number Diff line change 1+ /* -------------------------------------------------------------------------*\
2+ ** ScalaCheck **
3+ ** Copyright (c) 2007-2017 Rickard Nilsson. All rights reserved. **
4+ ** http://www.scalacheck.org **
5+ ** **
6+ ** This software is released under the terms of the Revised BSD License. **
7+ ** There is NO WARRANTY. See the file LICENSE for the full text. **
8+ \*------------------------------------------------------------------------ */
9+
10+ package org .scalacheck
11+
12+ import Test ._
13+
14+ import scala .scalanative .testinterface .PreloadedClassLoader
15+
16+ private [scalacheck] object Platform {
17+
18+ def runWorkers (
19+ params : Parameters ,
20+ workerFun : Int => Result ,
21+ stop : () => Unit
22+ ): Result = {
23+ workerFun(0 )
24+ }
25+
26+ def loadModule (name : String , loader : ClassLoader ): AnyRef =
27+ loader.asInstanceOf [PreloadedClassLoader ].loadPreloaded(name)
28+
29+ def newInstance (name : String , loader : ClassLoader , paramTypes : Seq [Class [_]])(args : Seq [AnyRef ]): AnyRef =
30+ org.scalajs.testinterface.TestUtils .newInstance(name, loader, paramTypes)(args)
31+
32+ // We don't need those annotation in Native, and they have been deprecated.
33+ // We use `String` instead of the definition in Native because `-Xfatal-warnings`
34+ // is set.
35+ type EnableReflectiveInstantiation = String
36+ }
Original file line number Diff line number Diff line change @@ -7,4 +7,6 @@ val scalaJSVersion =
77
88addSbtPlugin(" org.scala-js" % " sbt-scalajs" % scalaJSVersion)
99
10+ addSbtPlugin(" org.scala-native" % " sbt-scala-native" % " 0.3.3" )
11+
1012scalacOptions += " -deprecation"
Original file line number Diff line number Diff line change @@ -144,8 +144,8 @@ object PropSpecification extends Properties("Prop") {
144144 }
145145
146146 property(" throws" ) = throws(classOf [java.lang.Exception ]) {
147- val s : String = null
148- s.length
147+ val it : Iterator [ Int ] = Iterator .empty
148+ it.next()
149149 }
150150
151151 property(" sizedProp" ) = {
You can’t perform that action at this time.
0 commit comments