Skip to content

Scalatest #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 26 commits into from
Dec 30, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0582ca4
Integrate scalatest and port TestInstant
cquiroz Dec 8, 2016
5f2ba18
RIF Add null checks where appropriate
cquiroz Dec 10, 2016
fda7f41
Improve testing code, removing java style on the code
cquiroz Dec 10, 2016
cee0344
Remove calls toLowerCase with a Locale argument, note that the defaul…
cquiroz Dec 10, 2016
c639ad5
Add platform specific configuration objects
cquiroz Dec 11, 2016
162fc26
Revert "RIF Add null checks where appropriate"
cquiroz Dec 11, 2016
a4ce7ed
Use different NPE types for each platform
cquiroz Dec 11, 2016
bb4bb11
Port TestDayOfWeek to scalatest
cquiroz Dec 10, 2016
8f563ff
Ported TestPeriod to scalatest
cquiroz Dec 12, 2016
7851db5
Ported TestDuration to scalatest
cquiroz Dec 12, 2016
65499a2
Port TestDuration to scalatest
cquiroz Dec 13, 2016
0415cc2
Remove name from contributors
cquiroz Dec 13, 2016
d03d684
Ported TestMonth to scalatest
cquiroz Dec 15, 2016
84a3768
Adapted TestInstant to the latest changes on the upstream branch
cquiroz Dec 26, 2016
c5e125f
Ported TestJulianFields to scalatest
cquiroz Dec 26, 2016
6532404
Don't run tests in paralell on the JS side
cquiroz Dec 26, 2016
10cf7fb
Port TestValueRange to scalatest
cquiroz Dec 27, 2016
e5f0ddf
Port TestChronoField to scalatest
cquiroz Dec 28, 2016
4691091
Port TestTemporalAdjusters to scalatest
cquiroz Dec 28, 2016
7e746e2
Port of TestIsoFields to scalatest
cquiroz Dec 29, 2016
970ca85
Port of TestZoneOffset to scalatest
cquiroz Dec 29, 2016
729487f
Port of TestOffsetDateTime_instants to scalatest
cquiroz Dec 29, 2016
b31f7f6
Port of TestDecimalStyle to scalatest
cquiroz Dec 29, 2016
7347457
Port of TestDateTimeTextPrinting to scalatest
cquiroz Dec 29, 2016
b27d720
Port of TestSimpleDateTimeTextProvider to scalatest
cquiroz Dec 29, 2016
4b013aa
Separate travis calls to jvm/js
cquiroz Dec 29, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#
# For more information, see https://travis-ci.org

sudo: true

language: scala

jdk:
Expand Down Expand Up @@ -33,7 +35,8 @@ env:
- COURSIER_NO_TERM=1

script:
- sbt scalajavatimeJVM/test scalajavatimeJS/test
- sbt ++$TRAVIS_SCALA_VERSION clean scalajavatimeJVM/test
- sbt ++$TRAVIS_SCALA_VERSION clean scalajavatimeJS/test
- sbt docs/makeMicrosite
#- sbt clean coverage test &&
# sbt coverageAggregate
Expand Down
12 changes: 6 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ lazy val commonSettings = Seq(
Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
pomExtra := pomData,
pomIncludeRepository := { _ => false }
pomIncludeRepository := { _ => false },
libraryDependencies ++= Seq(
"org.scalatest" %%% "scalatest" % "3.0.1" % "test"
)
)

lazy val root = project.in(file("."))
Expand Down Expand Up @@ -91,14 +94,15 @@ lazy val scalajavatime = crossProject.crossType(CrossType.Full).in(file("."))
baseDirectory in Test := baseDirectory.value.getParentFile,
// Use CLDR provider for locales
// https://docs.oracle.com/javase/8/docs/technotes/guides/intl/enhancements.8.html#cldr
javaOptions in Test ++= Seq("-Djava.locale.providers=CLDR"),
javaOptions in Test ++= Seq("-Duser.language=en", "-Duser.country=US", "-Djava.locale.providers=CLDR"),
TestNGPlugin.testNGSuites := Seq(((resourceDirectory in Test).value / "testng.xml").absolutePath)
).jsSettings(
sourceGenerators in Compile += Def.task {
val srcDirs = (sourceDirectories in Compile).value
val destinationDir = (sourceManaged in Compile).value
copyAndReplace(srcDirs, destinationDir)
}.taskValue,
parallelExecution in Test := false,
libraryDependencies ++= Seq(
"io.github.cquiroz" %%% "scala-java-locales" % "0.5.0-cldr30"
)
Expand Down Expand Up @@ -153,10 +157,6 @@ lazy val pomData =
</developer>
</developers>
<contributors>
<contributor>
<name>Carlos Quiroz</name>
<url>https://github.com/cquiroz/</url>
</contributor>
<contributor>
<name>Javier Fernandez-Ivern</name>
<url>https://github.com/ivern</url>
Expand Down
20 changes: 20 additions & 0 deletions js/src/test/scala/org/threeten/bp/Platform.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package org.threeten.bp

object Platform {
type NPE = scala.scalajs.js.JavaScriptException

/** Returns `true` if and only if the code is executing on a JVM.
* Note: Returns `false` when executing on any JS VM.
*/
final val executingInJVM = true

def setupLocales(): Unit = {
if (Platform.executingInJVM) {
import locales.LocaleRegistry
import locales.cldr.data.pt_BR

LocaleRegistry.installLocale(pt_BR)
}
}

}
12 changes: 12 additions & 0 deletions jvm/src/test/scala/org/threeten/bp/Platform.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package org.threeten.bp

object Platform {
type NPE = NullPointerException

/** Returns `true` if and only if the code is executing on a JVM.
* Note: Returns `false` when executing on any JS VM.
*/
final val executingInJVM = false

def setupLocales(): Unit = ()
}
183 changes: 0 additions & 183 deletions jvm/src/test/scala/org/threeten/bp/TestDayOfWeek.scala

This file was deleted.

Loading