@@ -119,7 +119,7 @@ private void testMax(final DiscreteTopology<N> t, final N max) {
119
119
@ SuppressWarnings ({"rawtypes" , "unchecked" })
120
120
public void testMinMax () {
121
121
final DiscreteTopology [] ts = {DiscreteTopologies .BYTE , DiscreteTopologies .SHORT , DiscreteTopologies .INTEGER , DiscreteTopologies .LONG , DiscreteTopologies .FLOAT , DiscreteTopologies .DOUBLE , DiscreteTopologies .CHARACTER , DiscreteTopologies .LOCAL_DATE , DiscreteTopologies .DATE };
122
- final Object [] mins = {Byte .MIN_VALUE , Short .MIN_VALUE , Integer .MIN_VALUE , Long .MIN_VALUE , Float .MIN_VALUE , Double .MIN_VALUE , Character .MIN_VALUE , LocalDate .MIN , Dates .MIN_VALUE };
122
+ final Object [] mins = {Byte .MIN_VALUE , Short .MIN_VALUE , Integer .MIN_VALUE , Long .MIN_VALUE , - Float .MAX_VALUE , - Double .MAX_VALUE , Character .MIN_VALUE , LocalDate .MIN , Dates .MIN_VALUE };
123
123
final Object [] maxs = {Byte .MAX_VALUE , Short .MAX_VALUE , Integer .MAX_VALUE , Long .MAX_VALUE , Float .MAX_VALUE , Double .MAX_VALUE , Character .MAX_VALUE , LocalDate .MAX , Dates .MAX_VALUE };
124
124
for (int i = 0 , i$ = ts .length ; i < i$ ; ++i ) // [A]
125
125
MinMax .test (ts [i ], mins [i ], maxs [i ]);
@@ -129,7 +129,7 @@ public void testMinMax() {
129
129
@ SuppressWarnings ({"rawtypes" , "unchecked" })
130
130
public void testMinMaxArrayPrimitive () {
131
131
final DiscreteTopology [] ts = {DiscreteTopologies .BYTES , DiscreteTopologies .SHORTS , DiscreteTopologies .INTS , DiscreteTopologies .LONGS , DiscreteTopologies .FLOATS , DiscreteTopologies .DOUBLES , DiscreteTopologies .CHARS };
132
- final Object [] mins = {Byte .MIN_VALUE , Short .MIN_VALUE , Integer .MIN_VALUE , Long .MIN_VALUE , Float .MIN_VALUE , Double .MIN_VALUE , Character .MIN_VALUE };
132
+ final Object [] mins = {Byte .MIN_VALUE , Short .MIN_VALUE , Integer .MIN_VALUE , Long .MIN_VALUE , - Float .MAX_VALUE , - Double .MAX_VALUE , Character .MIN_VALUE };
133
133
final Object [] maxs = {Byte .MAX_VALUE , Short .MAX_VALUE , Integer .MAX_VALUE , Long .MAX_VALUE , Float .MAX_VALUE , Double .MAX_VALUE , Character .MAX_VALUE };
134
134
for (int i = 0 , i$ = ts .length ; i < i$ ; ++i ) { // [A]
135
135
for (int j = 0 ; j < 100 ; j = j * 2 + 1 ) { // [A]
@@ -152,7 +152,7 @@ public void testMinMaxArrayPrimitive() {
152
152
@ SuppressWarnings ({"rawtypes" , "unchecked" })
153
153
public void testMinMaxArrayObject () {
154
154
final DiscreteTopology [] ts = {DiscreteTopologies .BYTE_OBJS , DiscreteTopologies .SHORT_OBJS , DiscreteTopologies .INTEGERS , DiscreteTopologies .LONG_OBJS , DiscreteTopologies .FLOAT_OBJS , DiscreteTopologies .DOUBLE_OBJS , DiscreteTopologies .CHARACTERS };
155
- final Object [] mins = {Byte .MIN_VALUE , Short .MIN_VALUE , Integer .MIN_VALUE , Long .MIN_VALUE , Float .MIN_VALUE , Double .MIN_VALUE , Character .MIN_VALUE };
155
+ final Object [] mins = {Byte .MIN_VALUE , Short .MIN_VALUE , Integer .MIN_VALUE , Long .MIN_VALUE , - Float .MAX_VALUE , - Double .MAX_VALUE , Character .MIN_VALUE };
156
156
final Object [] maxs = {Byte .MAX_VALUE , Short .MAX_VALUE , Integer .MAX_VALUE , Long .MAX_VALUE , Float .MAX_VALUE , Double .MAX_VALUE , Character .MAX_VALUE };
157
157
for (int i = 0 , i$ = ts .length ; i < i$ ; ++i ) { // [A]
158
158
for (int j = 0 ; j < 100 ; j = j * 2 + 1 ) { // [A]
@@ -193,7 +193,7 @@ public void testMinMaxArray() {
193
193
@ Test
194
194
public void testString () {
195
195
for (int i = 0 ; i < 100 ; i = i * 2 + 1 ) // [N]
196
- MinMax .test (DiscreteTopologies .STRING , Strings .repeat (Character .MIN_VALUE , i ), Strings .repeat (Character .MAX_VALUE , i ));
196
+ MinMax .test (DiscreteTopologies .STRING , Strings .repeat (Character .MIN_VALUE , i ). toString () , Strings .repeat (Character .MAX_VALUE , i ). toString ( ));
197
197
}
198
198
199
199
@ Test
0 commit comments