@@ -584,11 +584,14 @@ class TestMonthDay extends GenDateTimeTest with BeforeAndAfter {
584
584
assertEquals(TEST_07_15 == null , false )
585
585
}
586
586
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
+ }
592
595
}
593
596
594
597
test(" test_hashCode_unique" ) {
@@ -607,15 +610,21 @@ class TestMonthDay extends GenDateTimeTest with BeforeAndAfter {
607
610
}
608
611
}
609
612
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" ))
612
618
}
613
619
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
+ }
619
628
620
629
test(" test_format_formatter" ) {
621
630
val f : DateTimeFormatter = DateTimeFormatter .ofPattern(" M d" )
0 commit comments