File tree 1 file changed +9
-15
lines changed
darwin-integration/nativeTest/src
1 file changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -58,22 +58,16 @@ class ConvertersTest {
58
58
// from threetenbp's tests for time zones
59
59
@Test
60
60
fun zoneOffsetToNSTimeZone () {
61
- for (i in - 17 .. 17 ) {
62
- for (j in - 59 .. 59 ) {
63
- if (i < 0 && j <= 0 || i > 0 && j >= 0 || i == 0 ) {
64
- val str = (if (i < 0 || j < 0 ) " -" else " +" ) +
65
- (abs(i) + 100 ).toString().substring(1 ) + " :" +
66
- (abs(j) + 100 ).toString().substring(1 ) + " :" +
67
- " 00"
68
- val test = TimeZone .of(str)
69
- zoneOffsetCheck(test, i, j)
70
- }
71
- }
61
+ for (i in - 18 * 60 .. 18 * 60 ) {
62
+ val hours = i / 60
63
+ val minutes = i % 60
64
+ val str = (if (i < 0 ) " -" else " +" ) +
65
+ (abs(hours) + 100 ).toString().substring(1 ) + " :" +
66
+ (abs(minutes) + 100 ).toString().substring(1 ) + " :" +
67
+ " 00"
68
+ val test = TimeZone .of(str)
69
+ zoneOffsetCheck(test, hours, minutes)
72
70
}
73
- val test1 = TimeZone .of(" -18:00:00" )
74
- zoneOffsetCheck(test1, - 18 , 0 )
75
- val test2 = TimeZone .of(" +18:00:00" )
76
- zoneOffsetCheck(test2, 18 , 0 )
77
71
}
78
72
79
73
@Test
You can’t perform that action at this time.
0 commit comments