fix field type tests

This commit is contained in:
Ryan Ernst 2015-06-15 17:03:32 -07:00
parent 7ab0009e41
commit 6e75f9fc93
5 changed files with 5 additions and 5 deletions

View File

@ -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);
}
}
}

View File

@ -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);
}
}
}

View File

@ -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);
}
}
}

View File

@ -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);
}
}
}

View File

@ -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);
}
}
}