test/java/time/test/java/time/TestLocalTime.java

Print this page




 151 
 152     @Test(groups={"implementation"})
 153     public void factory_time_4ints_singletons() {
 154         for (int i = 0; i < 24; i++) {
 155             LocalTime test1 = LocalTime.of(i, 0, 0, 0);
 156             LocalTime test2 = LocalTime.of(i, 0, 0, 0);
 157             assertSame(test1, test2);
 158         }
 159     }
 160 
 161     @Test(groups={"implementation"})
 162     public void factory_ofSecondOfDay_singletons() {
 163         for (int i = 0; i < 24; i++) {
 164             LocalTime test1 = LocalTime.ofSecondOfDay(i * 60L * 60L);
 165             LocalTime test2 = LocalTime.of(i, 0);
 166             assertSame(test1, test2);
 167         }
 168     }
 169 
 170     @Test(groups={"implementation"})
 171     public void factory_ofSecondOfDay7_long_int_singletons() {
 172         for (int i = 0; i < 24; i++) {
 173             LocalTime test1 = LocalTime.ofSecondOfDay(i * 60L * 60L, 0);
 174             LocalTime test2 = LocalTime.of(i, 0);
 175             assertSame(test1, test2);
 176         }
 177     }
 178 
 179     @Test(groups={"implementation"})
 180     public void factory_ofNanoOfDay_singletons() {
 181         for (int i = 0; i < 24; i++) {
 182             LocalTime test1 = LocalTime.ofNanoOfDay(i * 1000000000L * 60L * 60L);
 183             LocalTime test2 = LocalTime.of(i, 0);
 184             assertSame(test1, test2);
 185         }
 186     }
 187 
 188 }


 151 
 152     @Test(groups={"implementation"})
 153     public void factory_time_4ints_singletons() {
 154         for (int i = 0; i < 24; i++) {
 155             LocalTime test1 = LocalTime.of(i, 0, 0, 0);
 156             LocalTime test2 = LocalTime.of(i, 0, 0, 0);
 157             assertSame(test1, test2);
 158         }
 159     }
 160 
 161     @Test(groups={"implementation"})
 162     public void factory_ofSecondOfDay_singletons() {
 163         for (int i = 0; i < 24; i++) {
 164             LocalTime test1 = LocalTime.ofSecondOfDay(i * 60L * 60L);
 165             LocalTime test2 = LocalTime.of(i, 0);
 166             assertSame(test1, test2);
 167         }
 168     }
 169 
 170     @Test(groups={"implementation"})









 171     public void factory_ofNanoOfDay_singletons() {
 172         for (int i = 0; i < 24; i++) {
 173             LocalTime test1 = LocalTime.ofNanoOfDay(i * 1000000000L * 60L * 60L);
 174             LocalTime test2 = LocalTime.of(i, 0);
 175             assertSame(test1, test2);
 176         }
 177     }
 178 
 179 }