Skip to content

Commit 8c6856a

Browse files
authored
Merge pull request #8 from cquiroz/scalatest
Scalatest
2 parents 80a8ee3 + 4b013aa commit 8c6856a

33 files changed

+6241
-3179
lines changed

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#
55
# For more information, see https://travis-ci.org
66

7+
sudo: true
8+
79
language: scala
810

911
jdk:
@@ -33,7 +35,8 @@ env:
3335
- COURSIER_NO_TERM=1
3436

3537
script:
36-
- sbt scalajavatimeJVM/test scalajavatimeJS/test
38+
- sbt ++$TRAVIS_SCALA_VERSION clean scalajavatimeJVM/test
39+
- sbt ++$TRAVIS_SCALA_VERSION clean scalajavatimeJS/test
3740
- sbt docs/makeMicrosite
3841
#- sbt clean coverage test &&
3942
# sbt coverageAggregate

build.sbt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ lazy val commonSettings = Seq(
2828
Some("releases" at nexus + "service/local/staging/deploy/maven2")
2929
},
3030
pomExtra := pomData,
31-
pomIncludeRepository := { _ => false }
31+
pomIncludeRepository := { _ => false },
32+
libraryDependencies ++= Seq(
33+
"org.scalatest" %%% "scalatest" % "3.0.1" % "test"
34+
)
3235
)
3336

3437
lazy val root = project.in(file("."))
@@ -91,14 +94,15 @@ lazy val scalajavatime = crossProject.crossType(CrossType.Full).in(file("."))
9194
baseDirectory in Test := baseDirectory.value.getParentFile,
9295
// Use CLDR provider for locales
9396
// https://docs.oracle.com/javase/8/docs/technotes/guides/intl/enhancements.8.html#cldr
94-
javaOptions in Test ++= Seq("-Djava.locale.providers=CLDR"),
97+
javaOptions in Test ++= Seq("-Duser.language=en", "-Duser.country=US", "-Djava.locale.providers=CLDR"),
9598
TestNGPlugin.testNGSuites := Seq(((resourceDirectory in Test).value / "testng.xml").absolutePath)
9699
).jsSettings(
97100
sourceGenerators in Compile += Def.task {
98101
val srcDirs = (sourceDirectories in Compile).value
99102
val destinationDir = (sourceManaged in Compile).value
100103
copyAndReplace(srcDirs, destinationDir)
101104
}.taskValue,
105+
parallelExecution in Test := false,
102106
libraryDependencies ++= Seq(
103107
"io.github.cquiroz" %%% "scala-java-locales" % "0.5.0-cldr30"
104108
)
@@ -153,10 +157,6 @@ lazy val pomData =
153157
</developer>
154158
</developers>
155159
<contributors>
156-
<contributor>
157-
<name>Carlos Quiroz</name>
158-
<url>https://github.com/cquiroz/</url>
159-
</contributor>
160160
<contributor>
161161
<name>Javier Fernandez-Ivern</name>
162162
<url>https://github.com/ivern</url>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package org.threeten.bp
2+
3+
object Platform {
4+
type NPE = scala.scalajs.js.JavaScriptException
5+
6+
/** Returns `true` if and only if the code is executing on a JVM.
7+
* Note: Returns `false` when executing on any JS VM.
8+
*/
9+
final val executingInJVM = true
10+
11+
def setupLocales(): Unit = {
12+
if (Platform.executingInJVM) {
13+
import locales.LocaleRegistry
14+
import locales.cldr.data.pt_BR
15+
16+
LocaleRegistry.installLocale(pt_BR)
17+
}
18+
}
19+
20+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package org.threeten.bp
2+
3+
object Platform {
4+
type NPE = NullPointerException
5+
6+
/** Returns `true` if and only if the code is executing on a JVM.
7+
* Note: Returns `false` when executing on any JS VM.
8+
*/
9+
final val executingInJVM = false
10+
11+
def setupLocales(): Unit = ()
12+
}

jvm/src/test/scala/org/threeten/bp/TestDayOfWeek.scala

Lines changed: 0 additions & 183 deletions
This file was deleted.

0 commit comments

Comments
 (0)