Skip to content

Commit 72dad02

Browse files
authored
Merge pull request #53 from cquiroz/scala_2.12
Scala 2.12.2 and 2.11.11
2 parents 88b3c59 + e8a1867 commit 72dad02

File tree

3 files changed

+32
-14
lines changed

3 files changed

+32
-14
lines changed

build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import TZDBTasks._
33

44
enablePlugins(MicrositesPlugin)
55

6-
val scalaVer = "2.11.8"
7-
val crossScalaVer = Seq(scalaVer, "2.10.6", "2.12.0")
6+
val scalaVer = "2.11.11"
7+
val crossScalaVer = Seq(scalaVer, "2.10.6", "2.12.2")
88

99
lazy val downloadFromZip: TaskKey[Unit] =
1010
taskKey[Unit]("Download the tzdb tarball and extract it")

changes.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@
1010
<body>
1111
<!-- types are add, fix, remove, update -->
1212
<release version="2.0.0-M11" date="2017-04-16" description="v2.0.0-M11">
13+
<action dev="cquiroz" type="update" >
14+
Support Hijrah chronology on scala.js
15+
</action>
16+
<action dev="cquiroz" type="update" >
17+
Update to scala 2.12.2
18+
</action>
19+
<action dev="cquiroz" type="update" >
20+
Update to scala 2.11.8
21+
</action>
1322
<action dev="cquiroz" type="update" >
1423
Port all tests to scalatest
1524
</action>

shared/src/test/scala/org/threeten/bp/temporal/TestMonthDay.scala

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -584,11 +584,14 @@ class TestMonthDay extends GenDateTimeTest with BeforeAndAfter {
584584
assertEquals(TEST_07_15 == null, false)
585585
}
586586

587-
/*@Test(dataProvider = "sampleDates") def test_hashCode(m: Int, d: Int): Unit = {
588-
val a: MonthDay = MonthDay.of(m, d)
589-
assertEquals(a.hashCode, a.hashCode)
590-
val b: MonthDay = MonthDay.of(m, d)
591-
assertEquals(a.hashCode, b.hashCode)
587+
test("test_hashCode") {
588+
provider_sampleDates.foreach {
589+
case (m, d) =>
590+
val a: MonthDay = MonthDay.of(m, d)
591+
assertEquals(a.hashCode, a.hashCode)
592+
val b: MonthDay = MonthDay.of(m, d)
593+
assertEquals(a.hashCode, b.hashCode)
594+
}
592595
}
593596

594597
test("test_hashCode_unique") {
@@ -607,15 +610,21 @@ class TestMonthDay extends GenDateTimeTest with BeforeAndAfter {
607610
}
608611
}
609612

610-
@DataProvider(name = "sampleToString") private[temporal] def provider_sampleToString: Array[Array[Any]] = {
611-
Array[Array[Any]](Array(7, 5, "--07-05"), Array(12, 31, "--12-31"), Array(1, 2, "--01-02"))
613+
val provider_sampleToString: List[(Int, Int, String)] = {
614+
List(
615+
(7, 5, "--07-05"),
616+
(12, 31, "--12-31"),
617+
(1, 2, "--01-02"))
612618
}
613619

614-
@Test(dataProvider = "sampleToString") def test_toString(m: Int, d: Int, expected: String): Unit = {
615-
val test: MonthDay = MonthDay.of(m, d)
616-
val str: String = test.toString
617-
assertEquals(str, expected)
618-
}*/
620+
test("test_toString") {
621+
provider_sampleToString.foreach {
622+
case (m, d, expected) =>
623+
val test: MonthDay = MonthDay.of(m, d)
624+
val str: String = test.toString
625+
assertEquals(str, expected)
626+
}
627+
}
619628

620629
test("test_format_formatter") {
621630
val f: DateTimeFormatter = DateTimeFormatter.ofPattern("M d")

0 commit comments

Comments
 (0)