fix field type tests
This commit is contained in:
parent
7ab0009e41
commit
6e75f9fc93
|
@ -38,7 +38,7 @@ public class BinaryFieldTypeTests extends FieldTypeTestCase {
|
|||
BinaryFieldMapper.BinaryFieldType bft = (BinaryFieldMapper.BinaryFieldType)ft;
|
||||
switch (propNum) {
|
||||
case 0: bft.setTryUncompressing(!bft.tryUncompressing()); break;
|
||||
default: super.modifyProperty(ft, 1 + propNum);
|
||||
default: super.modifyProperty(ft, propNum - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ public class DateFieldTypeTests extends FieldTypeTestCase {
|
|||
switch (propNum) {
|
||||
case 0: dft.setDateTimeFormatter(Joda.forPattern("basic_week_date", Locale.ROOT)); break;
|
||||
case 1: dft.setTimeUnit(TimeUnit.HOURS); break;
|
||||
default: super.modifyProperty(ft, 2 + propNum);
|
||||
default: super.modifyProperty(ft, propNum - 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ public class GeoPointFieldTypeTests extends FieldTypeTestCase {
|
|||
case 3: gft.setValidateLat(!gft.validateLat()); break;
|
||||
case 4: gft.setNormalizeLon(!gft.normalizeLon()); break;
|
||||
case 5: gft.setNormalizeLat(!gft.normalizeLat()); break;
|
||||
default: super.modifyProperty(ft, 6 + propNum);
|
||||
default: super.modifyProperty(ft, propNum - 6);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ public class GeoShapeFieldTypeTests extends FieldTypeTestCase {
|
|||
case 3: gft.setPrecisionInMeters(20); break;
|
||||
case 4: gft.setDefaultDistanceErrorPct(0.5); break;
|
||||
case 5: gft.setOrientation(ShapeBuilder.Orientation.LEFT); break;
|
||||
default: super.modifyProperty(ft, 6 + propNum);
|
||||
default: super.modifyProperty(ft, propNum - 6);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ public class FieldNamesFieldTypeTests extends FieldTypeTestCase {
|
|||
FieldNamesFieldMapper.FieldNamesFieldType fnft = (FieldNamesFieldMapper.FieldNamesFieldType)ft;
|
||||
switch (propNum) {
|
||||
case 0: fnft.setEnabled(!fnft.isEnabled()); break;
|
||||
default: super.modifyProperty(ft, 1 + propNum);
|
||||
default: super.modifyProperty(ft, propNum - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue