From 6e75f9fc933d21a05f983bd4eee61d70773229fc Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Mon, 15 Jun 2015 17:03:32 -0700 Subject: [PATCH] fix field type tests --- .../elasticsearch/index/mapper/core/BinaryFieldTypeTests.java | 2 +- .../org/elasticsearch/index/mapper/core/DateFieldTypeTests.java | 2 +- .../elasticsearch/index/mapper/geo/GeoPointFieldTypeTests.java | 2 +- .../elasticsearch/index/mapper/geo/GeoShapeFieldTypeTests.java | 2 +- .../index/mapper/internal/FieldNamesFieldTypeTests.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/src/test/java/org/elasticsearch/index/mapper/core/BinaryFieldTypeTests.java b/core/src/test/java/org/elasticsearch/index/mapper/core/BinaryFieldTypeTests.java index 930b6eabb9b..47403c8b1df 100644 --- a/core/src/test/java/org/elasticsearch/index/mapper/core/BinaryFieldTypeTests.java +++ b/core/src/test/java/org/elasticsearch/index/mapper/core/BinaryFieldTypeTests.java @@ -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); } } } diff --git a/core/src/test/java/org/elasticsearch/index/mapper/core/DateFieldTypeTests.java b/core/src/test/java/org/elasticsearch/index/mapper/core/DateFieldTypeTests.java index 7c6828c666b..b6e162c8c38 100644 --- a/core/src/test/java/org/elasticsearch/index/mapper/core/DateFieldTypeTests.java +++ b/core/src/test/java/org/elasticsearch/index/mapper/core/DateFieldTypeTests.java @@ -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); } } } diff --git a/core/src/test/java/org/elasticsearch/index/mapper/geo/GeoPointFieldTypeTests.java b/core/src/test/java/org/elasticsearch/index/mapper/geo/GeoPointFieldTypeTests.java index a7f8c1e3c85..71f6f88d9aa 100644 --- a/core/src/test/java/org/elasticsearch/index/mapper/geo/GeoPointFieldTypeTests.java +++ b/core/src/test/java/org/elasticsearch/index/mapper/geo/GeoPointFieldTypeTests.java @@ -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); } } } diff --git a/core/src/test/java/org/elasticsearch/index/mapper/geo/GeoShapeFieldTypeTests.java b/core/src/test/java/org/elasticsearch/index/mapper/geo/GeoShapeFieldTypeTests.java index 9edd6bc9388..527d79c0ee9 100644 --- a/core/src/test/java/org/elasticsearch/index/mapper/geo/GeoShapeFieldTypeTests.java +++ b/core/src/test/java/org/elasticsearch/index/mapper/geo/GeoShapeFieldTypeTests.java @@ -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); } } } diff --git a/core/src/test/java/org/elasticsearch/index/mapper/internal/FieldNamesFieldTypeTests.java b/core/src/test/java/org/elasticsearch/index/mapper/internal/FieldNamesFieldTypeTests.java index 25107e26607..8f0ea33d37e 100644 --- a/core/src/test/java/org/elasticsearch/index/mapper/internal/FieldNamesFieldTypeTests.java +++ b/core/src/test/java/org/elasticsearch/index/mapper/internal/FieldNamesFieldTypeTests.java @@ -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); } } }