From 2cc561eab1d2aada8a52e3c21aee069842dab6c9 Mon Sep 17 00:00:00 2001 From: Don-vip Date: Sat, 4 Nov 2017 19:27:56 +0000 Subject: [PATCH] EqualsVerifier does not work with newer Java versions -> disable tests automatically in this case Workaround to https://github.com/jqno/equalsverifier/issues/177 / https://github.com/raphw/byte-buddy/issues/370 Inspired by https://issues.apache.org/jira/browse/SOLR-11606 git-svn-id: https://josm.openstreetmap.de/svn/trunk@13079 0c6e7542-c601-0410-84e7-c038aed88b3b --- test/unit/org/openstreetmap/josm/TestUtils.java | 14 ++++++++++++++ .../josm/actions/CombineWayActionTest.java | 1 + .../josm/actions/ExtensionFileFilterTest.java | 1 + .../openstreetmap/josm/command/AddCommandTest.java | 2 ++ .../josm/command/AddPrimitivesCommandTest.java | 2 ++ .../josm/command/ChangeCommandTest.java | 2 ++ .../josm/command/ChangeNodesCommandTest.java | 2 ++ .../josm/command/ChangePropertyCommandTest.java | 2 ++ .../josm/command/ChangePropertyKeyCommandTest.java | 2 ++ .../ChangeRelationMemberRoleCommandTest.java | 2 ++ .../openstreetmap/josm/command/CommandTest.java | 2 ++ .../josm/command/DeleteCommandTest.java | 2 ++ .../josm/command/MoveCommandTest.java | 2 ++ .../josm/command/PurgeCommandTest.java | 2 ++ .../josm/command/RemoveNodesCommandTest.java | 2 ++ .../josm/command/RotateCommandTest.java | 2 ++ .../josm/command/ScaleCommandTest.java | 2 ++ .../josm/command/SelectCommandTest.java | 2 ++ .../josm/command/SequenceCommandTest.java | 2 ++ .../josm/command/TransformNodesCommandTest.java | 2 ++ .../command/conflict/ConflictAddCommandTest.java | 2 ++ .../conflict/ConflictResolveCommandTest.java | 2 ++ .../CoordinateConflictResolveCommandTest.java | 2 ++ .../DeletedStateConflictResolveCommandTest.java | 2 ++ .../ModifiedConflictResolveCommandTest.java | 2 ++ .../RelationMemberConflictResolverCommandTest.java | 2 ++ .../conflict/TagConflictResolveCommandTest.java | 2 ++ .../VersionConflictResolveCommandTest.java | 2 ++ .../WayNodesConflictResolverCommandTest.java | 2 ++ .../josm/data/coor/CachedLatLonTest.java | 2 ++ .../openstreetmap/josm/data/coor/LatLonTest.java | 2 ++ .../josm/data/correction/TagCorrectionTest.java | 2 ++ .../openstreetmap/josm/data/gpx/GpxDataTest.java | 2 ++ .../openstreetmap/josm/data/gpx/GpxRouteTest.java | 2 ++ .../data/gpx/ImmutableGpxTrackSegmentTest.java | 2 ++ .../josm/data/gpx/ImmutableGpxTrackTest.java | 2 ++ .../openstreetmap/josm/data/gpx/WayPointTest.java | 2 ++ .../josm/data/gpx/WithAttributesTest.java | 2 ++ .../openstreetmap/josm/data/notes/NoteTest.java | 2 ++ .../josm/data/oauth/OAuthParametersTest.java | 2 ++ .../josm/data/oauth/OAuthTokenTest.java | 2 ++ .../org/openstreetmap/josm/data/osm/BBoxTest.java | 2 ++ .../openstreetmap/josm/data/osm/FilterTest.java | 2 ++ .../openstreetmap/josm/data/osm/StorageTest.java | 2 ++ .../tagging/ac/AutoCompletionPriorityTest.java | 2 ++ .../org/openstreetmap/josm/gui/MapStatusTest.java | 2 ++ .../gui/preferences/advanced/PrefEntryTest.java | 2 ++ .../gui/tagging/ac/AutoCompletionManagerTest.java | 2 ++ .../josm/gui/util/WindowGeometryTest.java | 2 ++ .../josm/plugins/PluginHandlerTest.java | 2 ++ .../josm/spi/preferences/ListListSettingTest.java | 2 ++ .../josm/spi/preferences/ListSettingTest.java | 2 ++ .../josm/spi/preferences/MapListSettingTest.java | 2 ++ .../josm/spi/preferences/StringSettingTest.java | 2 ++ .../org/openstreetmap/josm/tools/MultiMapTest.java | 5 ++++- .../org/openstreetmap/josm/tools/PairTest.java | 2 ++ 56 files changed, 124 insertions(+), 1 deletion(-) diff --git a/test/unit/org/openstreetmap/josm/TestUtils.java b/test/unit/org/openstreetmap/josm/TestUtils.java index 1b2a7765cb..050d7de2ba 100644 --- a/test/unit/org/openstreetmap/josm/TestUtils.java +++ b/test/unit/org/openstreetmap/josm/TestUtils.java @@ -20,6 +20,7 @@ import java.util.Objects; import java.util.stream.Stream; +import org.junit.Assume; import org.openstreetmap.josm.command.Command; import org.openstreetmap.josm.data.osm.DataSet; import org.openstreetmap.josm.data.osm.Node; @@ -328,4 +329,17 @@ public static Component getComponentByName(Component root, String name) { return null; } } + + /** + * Use to assume that EqualsVerifier is working with the current JVM. + */ + public static void assumeWorkingEqualsVerifier() { + try { + // Workaround to https://github.com/jqno/equalsverifier/issues/177 + // Inspired by https://issues.apache.org/jira/browse/SOLR-11606 + nl.jqno.equalsverifier.internal.lib.bytebuddy.ClassFileVersion.ofThisVm(); + } catch (IllegalArgumentException e) { + Assume.assumeNoException(e); + } + } } diff --git a/test/unit/org/openstreetmap/josm/actions/CombineWayActionTest.java b/test/unit/org/openstreetmap/josm/actions/CombineWayActionTest.java index c8ffcab987..1b7428fae7 100644 --- a/test/unit/org/openstreetmap/josm/actions/CombineWayActionTest.java +++ b/test/unit/org/openstreetmap/josm/actions/CombineWayActionTest.java @@ -63,6 +63,7 @@ public void testTicket11957() throws IOException, IllegalDataException { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(NodePair.class).usingGetClass() .suppress(Warning.ANNOTATION) // FIXME: remove it after https://github.com/jqno/equalsverifier/issues/152 is fixed .withPrefabValues(Node.class, new Node(1), new Node(2)) diff --git a/test/unit/org/openstreetmap/josm/actions/ExtensionFileFilterTest.java b/test/unit/org/openstreetmap/josm/actions/ExtensionFileFilterTest.java index 460691b79b..f9fb63610d 100644 --- a/test/unit/org/openstreetmap/josm/actions/ExtensionFileFilterTest.java +++ b/test/unit/org/openstreetmap/josm/actions/ExtensionFileFilterTest.java @@ -44,6 +44,7 @@ public void testNewFilterWithArchiveExtensions() { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(ExtensionFileFilter.class).usingGetClass() .suppress(Warning.ANNOTATION) // FIXME: remove it after https://github.com/jqno/equalsverifier/issues/152 is fixed .verify(); diff --git a/test/unit/org/openstreetmap/josm/command/AddCommandTest.java b/test/unit/org/openstreetmap/josm/command/AddCommandTest.java index 34fd7bb99d..9a4ef006dd 100644 --- a/test/unit/org/openstreetmap/josm/command/AddCommandTest.java +++ b/test/unit/org/openstreetmap/josm/command/AddCommandTest.java @@ -8,6 +8,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.data.coor.LatLon; import org.openstreetmap.josm.data.osm.DataSet; import org.openstreetmap.josm.data.osm.Node; @@ -130,6 +131,7 @@ public void testDescription() { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(AddCommand.class).usingGetClass() .withPrefabValues(OsmPrimitive.class, new Node(1), new Node(2)) diff --git a/test/unit/org/openstreetmap/josm/command/AddPrimitivesCommandTest.java b/test/unit/org/openstreetmap/josm/command/AddPrimitivesCommandTest.java index f1f11629ca..9fcaccb7a1 100644 --- a/test/unit/org/openstreetmap/josm/command/AddPrimitivesCommandTest.java +++ b/test/unit/org/openstreetmap/josm/command/AddPrimitivesCommandTest.java @@ -13,6 +13,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.data.coor.LatLon; import org.openstreetmap.josm.data.osm.DataSet; import org.openstreetmap.josm.data.osm.Node; @@ -284,6 +285,7 @@ private NodeData createTestNode(int id) { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(AddPrimitivesCommand.class).usingGetClass() .withPrefabValues(DataSet.class, new DataSet(), new DataSet()) diff --git a/test/unit/org/openstreetmap/josm/command/ChangeCommandTest.java b/test/unit/org/openstreetmap/josm/command/ChangeCommandTest.java index ac7f548cbf..55e919a151 100644 --- a/test/unit/org/openstreetmap/josm/command/ChangeCommandTest.java +++ b/test/unit/org/openstreetmap/josm/command/ChangeCommandTest.java @@ -13,6 +13,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.command.CommandTest.CommandTestData; import org.openstreetmap.josm.data.coor.LatLon; import org.openstreetmap.josm.data.osm.DataIntegrityProblemException; @@ -153,6 +154,7 @@ public void testDescription() { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(ChangeCommand.class).usingGetClass() .withPrefabValues(DataSet.class, new DataSet(), new DataSet()) diff --git a/test/unit/org/openstreetmap/josm/command/ChangeNodesCommandTest.java b/test/unit/org/openstreetmap/josm/command/ChangeNodesCommandTest.java index 3d3c212ad8..6c46e3458e 100644 --- a/test/unit/org/openstreetmap/josm/command/ChangeNodesCommandTest.java +++ b/test/unit/org/openstreetmap/josm/command/ChangeNodesCommandTest.java @@ -14,6 +14,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.command.CommandTest.CommandTestData; import org.openstreetmap.josm.data.coor.LatLon; import org.openstreetmap.josm.data.osm.DataSet; @@ -124,6 +125,7 @@ public void testDescription() { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(ChangeNodesCommand.class).usingGetClass() .withPrefabValues(Way.class, new Way(1), new Way(2)) diff --git a/test/unit/org/openstreetmap/josm/command/ChangePropertyCommandTest.java b/test/unit/org/openstreetmap/josm/command/ChangePropertyCommandTest.java index 79f5351189..dd7120214a 100644 --- a/test/unit/org/openstreetmap/josm/command/ChangePropertyCommandTest.java +++ b/test/unit/org/openstreetmap/josm/command/ChangePropertyCommandTest.java @@ -16,6 +16,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.command.CommandTest.CommandTestData; import org.openstreetmap.josm.data.osm.DataSet; import org.openstreetmap.josm.data.osm.Node; @@ -277,6 +278,7 @@ public void testChildren() { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(ChangePropertyCommand.class).usingGetClass() .withPrefabValues(DataSet.class, new DataSet(), new DataSet()) diff --git a/test/unit/org/openstreetmap/josm/command/ChangePropertyKeyCommandTest.java b/test/unit/org/openstreetmap/josm/command/ChangePropertyKeyCommandTest.java index 399aa6ab37..88576a8047 100644 --- a/test/unit/org/openstreetmap/josm/command/ChangePropertyKeyCommandTest.java +++ b/test/unit/org/openstreetmap/josm/command/ChangePropertyKeyCommandTest.java @@ -13,6 +13,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.command.CommandTest.CommandTestData; import org.openstreetmap.josm.data.osm.DataSet; import org.openstreetmap.josm.data.osm.Node; @@ -148,6 +149,7 @@ public void testChildren() { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(ChangePropertyKeyCommand.class).usingGetClass() .withPrefabValues(DataSet.class, new DataSet(), new DataSet()) diff --git a/test/unit/org/openstreetmap/josm/command/ChangeRelationMemberRoleCommandTest.java b/test/unit/org/openstreetmap/josm/command/ChangeRelationMemberRoleCommandTest.java index d600ac3fd8..8b91e6e716 100644 --- a/test/unit/org/openstreetmap/josm/command/ChangeRelationMemberRoleCommandTest.java +++ b/test/unit/org/openstreetmap/josm/command/ChangeRelationMemberRoleCommandTest.java @@ -12,6 +12,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.command.CommandTest.CommandTestDataWithRelation; import org.openstreetmap.josm.data.osm.DataSet; import org.openstreetmap.josm.data.osm.OsmPrimitive; @@ -145,6 +146,7 @@ public void testChildren() { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(ChangeRelationMemberRoleCommand.class).usingGetClass() .withPrefabValues(Relation.class, new Relation(1), new Relation(2)) diff --git a/test/unit/org/openstreetmap/josm/command/CommandTest.java b/test/unit/org/openstreetmap/josm/command/CommandTest.java index b71ef80b23..03b071a1fe 100644 --- a/test/unit/org/openstreetmap/josm/command/CommandTest.java +++ b/test/unit/org/openstreetmap/josm/command/CommandTest.java @@ -5,6 +5,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.data.coor.LatLon; import org.openstreetmap.josm.data.osm.DataSet; import org.openstreetmap.josm.data.osm.Node; @@ -37,6 +38,7 @@ public class CommandTest { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(Command.class).usingGetClass() .withPrefabValues(DataSet.class, new DataSet(), new DataSet()) diff --git a/test/unit/org/openstreetmap/josm/command/DeleteCommandTest.java b/test/unit/org/openstreetmap/josm/command/DeleteCommandTest.java index d867949d47..f4d0738af7 100644 --- a/test/unit/org/openstreetmap/josm/command/DeleteCommandTest.java +++ b/test/unit/org/openstreetmap/josm/command/DeleteCommandTest.java @@ -15,6 +15,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.command.CommandTest.CommandTestDataWithRelation; import org.openstreetmap.josm.data.osm.DataSet; import org.openstreetmap.josm.data.osm.Node; @@ -377,6 +378,7 @@ public void testDescription() { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(DeleteCommand.class).usingGetClass() .withPrefabValues(DataSet.class, new DataSet(), new DataSet()) diff --git a/test/unit/org/openstreetmap/josm/command/MoveCommandTest.java b/test/unit/org/openstreetmap/josm/command/MoveCommandTest.java index cdf9f23a91..6176fc90d9 100644 --- a/test/unit/org/openstreetmap/josm/command/MoveCommandTest.java +++ b/test/unit/org/openstreetmap/josm/command/MoveCommandTest.java @@ -15,6 +15,7 @@ import org.junit.Rule; import org.junit.Test; import org.openstreetmap.josm.Main; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.command.CommandTest.CommandTestDataWithRelation; import org.openstreetmap.josm.data.coor.EastNorth; import org.openstreetmap.josm.data.coor.LatLon; @@ -259,6 +260,7 @@ public void testDescription() { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(MoveCommand.class).usingGetClass() .withPrefabValues(LatLon.class, LatLon.ZERO, new LatLon(45, 45)) diff --git a/test/unit/org/openstreetmap/josm/command/PurgeCommandTest.java b/test/unit/org/openstreetmap/josm/command/PurgeCommandTest.java index 87246e9fb4..d913b2927d 100644 --- a/test/unit/org/openstreetmap/josm/command/PurgeCommandTest.java +++ b/test/unit/org/openstreetmap/josm/command/PurgeCommandTest.java @@ -15,6 +15,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.command.CommandTest.CommandTestDataWithRelation; import org.openstreetmap.josm.data.conflict.Conflict; import org.openstreetmap.josm.data.osm.DataSet; @@ -144,6 +145,7 @@ public void testDescription() { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(PurgeCommand.class).usingGetClass() .withPrefabValues(DataSet.class, new DataSet(), new DataSet()) diff --git a/test/unit/org/openstreetmap/josm/command/RemoveNodesCommandTest.java b/test/unit/org/openstreetmap/josm/command/RemoveNodesCommandTest.java index 2ddcabfa51..35c5d655ac 100644 --- a/test/unit/org/openstreetmap/josm/command/RemoveNodesCommandTest.java +++ b/test/unit/org/openstreetmap/josm/command/RemoveNodesCommandTest.java @@ -11,6 +11,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.command.CommandTest.CommandTestDataWithRelation; import org.openstreetmap.josm.data.osm.DataSet; import org.openstreetmap.josm.data.osm.OsmPrimitive; @@ -122,6 +123,7 @@ public void testDescription() { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(RemoveNodesCommand.class).usingGetClass() .withPrefabValues(Way.class, new Way(1), new Way(2)) diff --git a/test/unit/org/openstreetmap/josm/command/RotateCommandTest.java b/test/unit/org/openstreetmap/josm/command/RotateCommandTest.java index 33644486d3..0145cc69bd 100644 --- a/test/unit/org/openstreetmap/josm/command/RotateCommandTest.java +++ b/test/unit/org/openstreetmap/josm/command/RotateCommandTest.java @@ -10,6 +10,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.command.CommandTest.CommandTestData; import org.openstreetmap.josm.data.coor.EastNorth; import org.openstreetmap.josm.data.coor.LatLon; @@ -135,6 +136,7 @@ public void testDescription() { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(RotateCommand.class).usingGetClass() .withPrefabValues(LatLon.class, LatLon.ZERO, new LatLon(45, 45)) .withPrefabValues(DataSet.class, new DataSet(), new DataSet()) diff --git a/test/unit/org/openstreetmap/josm/command/ScaleCommandTest.java b/test/unit/org/openstreetmap/josm/command/ScaleCommandTest.java index 1292c92c41..608ad718ba 100644 --- a/test/unit/org/openstreetmap/josm/command/ScaleCommandTest.java +++ b/test/unit/org/openstreetmap/josm/command/ScaleCommandTest.java @@ -10,6 +10,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.command.CommandTest.CommandTestData; import org.openstreetmap.josm.data.coor.EastNorth; import org.openstreetmap.josm.data.coor.LatLon; @@ -135,6 +136,7 @@ public void testDescription() { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(ScaleCommand.class).usingGetClass() .withPrefabValues(LatLon.class, LatLon.ZERO, new LatLon(45, 45)) diff --git a/test/unit/org/openstreetmap/josm/command/SelectCommandTest.java b/test/unit/org/openstreetmap/josm/command/SelectCommandTest.java index 4e667eeeb7..9c849855a2 100644 --- a/test/unit/org/openstreetmap/josm/command/SelectCommandTest.java +++ b/test/unit/org/openstreetmap/josm/command/SelectCommandTest.java @@ -12,6 +12,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.command.CommandTest.CommandTestDataWithRelation; import org.openstreetmap.josm.data.osm.DataSet; import org.openstreetmap.josm.data.osm.OsmPrimitive; @@ -148,6 +149,7 @@ public void testDescription() { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(SelectCommand.class).usingGetClass() .withPrefabValues(DataSet.class, new DataSet(), new DataSet()) diff --git a/test/unit/org/openstreetmap/josm/command/SequenceCommandTest.java b/test/unit/org/openstreetmap/josm/command/SequenceCommandTest.java index 98735b4623..d0c903b445 100644 --- a/test/unit/org/openstreetmap/josm/command/SequenceCommandTest.java +++ b/test/unit/org/openstreetmap/josm/command/SequenceCommandTest.java @@ -16,6 +16,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.command.CommandTest.CommandTestDataWithRelation; import org.openstreetmap.josm.data.osm.DataSet; import org.openstreetmap.josm.data.osm.Node; @@ -213,6 +214,7 @@ public void testDescription() { @Test public void testEqualsContract() { DataSet ds = new DataSet(); + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(SequenceCommand.class).usingGetClass() .withPrefabValues(Command.class, new AddCommand(ds, new Node(1)), new AddCommand(ds, new Node(2))) diff --git a/test/unit/org/openstreetmap/josm/command/TransformNodesCommandTest.java b/test/unit/org/openstreetmap/josm/command/TransformNodesCommandTest.java index 3a60e18c39..4c716cee8b 100644 --- a/test/unit/org/openstreetmap/josm/command/TransformNodesCommandTest.java +++ b/test/unit/org/openstreetmap/josm/command/TransformNodesCommandTest.java @@ -3,6 +3,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.data.coor.LatLon; import org.openstreetmap.josm.data.osm.DataSet; import org.openstreetmap.josm.data.osm.User; @@ -30,6 +31,7 @@ public class TransformNodesCommandTest { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(TransformNodesCommand.class).usingGetClass() .withPrefabValues(LatLon.class, LatLon.ZERO, new LatLon(45, 45)) diff --git a/test/unit/org/openstreetmap/josm/command/conflict/ConflictAddCommandTest.java b/test/unit/org/openstreetmap/josm/command/conflict/ConflictAddCommandTest.java index ba22ba4356..dae3a183fb 100644 --- a/test/unit/org/openstreetmap/josm/command/conflict/ConflictAddCommandTest.java +++ b/test/unit/org/openstreetmap/josm/command/conflict/ConflictAddCommandTest.java @@ -8,6 +8,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.command.CommandTest.CommandTestData; import org.openstreetmap.josm.data.conflict.Conflict; import org.openstreetmap.josm.data.osm.DataSet; @@ -72,6 +73,7 @@ public void testGetDescriptionIcon() { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(ConflictAddCommand.class).usingGetClass() .withPrefabValues(DataSet.class, new DataSet(), new DataSet()) diff --git a/test/unit/org/openstreetmap/josm/command/conflict/ConflictResolveCommandTest.java b/test/unit/org/openstreetmap/josm/command/conflict/ConflictResolveCommandTest.java index e1c43a1641..f301521251 100644 --- a/test/unit/org/openstreetmap/josm/command/conflict/ConflictResolveCommandTest.java +++ b/test/unit/org/openstreetmap/josm/command/conflict/ConflictResolveCommandTest.java @@ -3,6 +3,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.data.conflict.Conflict; import org.openstreetmap.josm.data.osm.DataSet; import org.openstreetmap.josm.data.osm.Node; @@ -31,6 +32,7 @@ public class ConflictResolveCommandTest { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(ConflictResolveCommand.class).usingGetClass() .withPrefabValues(Conflict.class, new Conflict<>(new Node(1, 1), new Node(2, 1)), diff --git a/test/unit/org/openstreetmap/josm/command/conflict/CoordinateConflictResolveCommandTest.java b/test/unit/org/openstreetmap/josm/command/conflict/CoordinateConflictResolveCommandTest.java index 35b45f6f52..859eefc0ae 100644 --- a/test/unit/org/openstreetmap/josm/command/conflict/CoordinateConflictResolveCommandTest.java +++ b/test/unit/org/openstreetmap/josm/command/conflict/CoordinateConflictResolveCommandTest.java @@ -8,6 +8,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.command.CommandTest.CommandTestData; import org.openstreetmap.josm.data.conflict.Conflict; import org.openstreetmap.josm.data.coor.LatLon; @@ -89,6 +90,7 @@ public void testGetDescriptionIcon() { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(CoordinateConflictResolveCommand.class).usingGetClass() .withPrefabValues(Conflict.class, new Conflict<>(new Node(), new Node()), new Conflict<>(new Way(), new Way())) diff --git a/test/unit/org/openstreetmap/josm/command/conflict/DeletedStateConflictResolveCommandTest.java b/test/unit/org/openstreetmap/josm/command/conflict/DeletedStateConflictResolveCommandTest.java index 139d041bde..454b6dd7bf 100644 --- a/test/unit/org/openstreetmap/josm/command/conflict/DeletedStateConflictResolveCommandTest.java +++ b/test/unit/org/openstreetmap/josm/command/conflict/DeletedStateConflictResolveCommandTest.java @@ -3,6 +3,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.data.conflict.Conflict; import org.openstreetmap.josm.data.osm.DataSet; import org.openstreetmap.josm.data.osm.Node; @@ -32,6 +33,7 @@ public class DeletedStateConflictResolveCommandTest { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(DeletedStateConflictResolveCommand.class).usingGetClass() .withPrefabValues(Conflict.class, new Conflict<>(new Node(), new Node()), new Conflict<>(new Way(), new Way())) diff --git a/test/unit/org/openstreetmap/josm/command/conflict/ModifiedConflictResolveCommandTest.java b/test/unit/org/openstreetmap/josm/command/conflict/ModifiedConflictResolveCommandTest.java index d8a18b1461..3b127acd40 100644 --- a/test/unit/org/openstreetmap/josm/command/conflict/ModifiedConflictResolveCommandTest.java +++ b/test/unit/org/openstreetmap/josm/command/conflict/ModifiedConflictResolveCommandTest.java @@ -3,6 +3,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.data.conflict.Conflict; import org.openstreetmap.josm.data.osm.DataSet; import org.openstreetmap.josm.data.osm.Node; @@ -32,6 +33,7 @@ public class ModifiedConflictResolveCommandTest { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(ModifiedConflictResolveCommand.class).usingGetClass() .withPrefabValues(Conflict.class, new Conflict<>(new Node(), new Node()), new Conflict<>(new Way(), new Way())) diff --git a/test/unit/org/openstreetmap/josm/command/conflict/RelationMemberConflictResolverCommandTest.java b/test/unit/org/openstreetmap/josm/command/conflict/RelationMemberConflictResolverCommandTest.java index 019d0746de..8084b1319c 100644 --- a/test/unit/org/openstreetmap/josm/command/conflict/RelationMemberConflictResolverCommandTest.java +++ b/test/unit/org/openstreetmap/josm/command/conflict/RelationMemberConflictResolverCommandTest.java @@ -3,6 +3,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.data.conflict.Conflict; import org.openstreetmap.josm.data.osm.DataSet; import org.openstreetmap.josm.data.osm.Node; @@ -32,6 +33,7 @@ public class RelationMemberConflictResolverCommandTest { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(RelationMemberConflictResolverCommand.class).usingGetClass() .withPrefabValues(Relation.class, new Relation(1), new Relation(2)) diff --git a/test/unit/org/openstreetmap/josm/command/conflict/TagConflictResolveCommandTest.java b/test/unit/org/openstreetmap/josm/command/conflict/TagConflictResolveCommandTest.java index 0b1857eb1d..f250830796 100644 --- a/test/unit/org/openstreetmap/josm/command/conflict/TagConflictResolveCommandTest.java +++ b/test/unit/org/openstreetmap/josm/command/conflict/TagConflictResolveCommandTest.java @@ -3,6 +3,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.data.conflict.Conflict; import org.openstreetmap.josm.data.osm.DataSet; import org.openstreetmap.josm.data.osm.Node; @@ -32,6 +33,7 @@ public class TagConflictResolveCommandTest { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(TagConflictResolveCommand.class).usingGetClass() .withPrefabValues(Conflict.class, new Conflict<>(new Node(), new Node()), new Conflict<>(new Way(), new Way())) diff --git a/test/unit/org/openstreetmap/josm/command/conflict/VersionConflictResolveCommandTest.java b/test/unit/org/openstreetmap/josm/command/conflict/VersionConflictResolveCommandTest.java index da59030055..64b6676056 100644 --- a/test/unit/org/openstreetmap/josm/command/conflict/VersionConflictResolveCommandTest.java +++ b/test/unit/org/openstreetmap/josm/command/conflict/VersionConflictResolveCommandTest.java @@ -3,6 +3,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.data.conflict.Conflict; import org.openstreetmap.josm.data.osm.DataSet; import org.openstreetmap.josm.data.osm.Node; @@ -32,6 +33,7 @@ public class VersionConflictResolveCommandTest { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(VersionConflictResolveCommand.class).usingGetClass() .withPrefabValues(Conflict.class, new Conflict<>(new Node(), new Node()), new Conflict<>(new Way(), new Way())) diff --git a/test/unit/org/openstreetmap/josm/command/conflict/WayNodesConflictResolverCommandTest.java b/test/unit/org/openstreetmap/josm/command/conflict/WayNodesConflictResolverCommandTest.java index ee5783e5dc..5769a153fa 100644 --- a/test/unit/org/openstreetmap/josm/command/conflict/WayNodesConflictResolverCommandTest.java +++ b/test/unit/org/openstreetmap/josm/command/conflict/WayNodesConflictResolverCommandTest.java @@ -3,6 +3,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.data.conflict.Conflict; import org.openstreetmap.josm.data.osm.DataSet; import org.openstreetmap.josm.data.osm.Node; @@ -32,6 +33,7 @@ public class WayNodesConflictResolverCommandTest { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(WayNodesConflictResolverCommand.class).usingGetClass() .withPrefabValues(Conflict.class, new Conflict<>(new Node(), new Node()), new Conflict<>(new Way(), new Way())) diff --git a/test/unit/org/openstreetmap/josm/data/coor/CachedLatLonTest.java b/test/unit/org/openstreetmap/josm/data/coor/CachedLatLonTest.java index ce013969a2..dc699c20fb 100644 --- a/test/unit/org/openstreetmap/josm/data/coor/CachedLatLonTest.java +++ b/test/unit/org/openstreetmap/josm/data/coor/CachedLatLonTest.java @@ -5,6 +5,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.testutils.JOSMTestRules; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; @@ -28,6 +29,7 @@ public class CachedLatLonTest { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(CachedLatLon.class).usingGetClass() .suppress(Warning.NONFINAL_FIELDS) .withPrefabValues(DecimalFormat.class, new DecimalFormat("00.0"), new DecimalFormat("00.000")) diff --git a/test/unit/org/openstreetmap/josm/data/coor/LatLonTest.java b/test/unit/org/openstreetmap/josm/data/coor/LatLonTest.java index bfad7b19f3..d58b6a2dc5 100644 --- a/test/unit/org/openstreetmap/josm/data/coor/LatLonTest.java +++ b/test/unit/org/openstreetmap/josm/data/coor/LatLonTest.java @@ -9,6 +9,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.data.Bounds; import org.openstreetmap.josm.testutils.JOSMTestRules; @@ -145,6 +146,7 @@ public void testToIntervalLon() { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(LatLon.class).usingGetClass() .withPrefabValues(DecimalFormat.class, new DecimalFormat("00.0"), new DecimalFormat("00.000")) .verify(); diff --git a/test/unit/org/openstreetmap/josm/data/correction/TagCorrectionTest.java b/test/unit/org/openstreetmap/josm/data/correction/TagCorrectionTest.java index 6960185243..8357524b43 100644 --- a/test/unit/org/openstreetmap/josm/data/correction/TagCorrectionTest.java +++ b/test/unit/org/openstreetmap/josm/data/correction/TagCorrectionTest.java @@ -3,6 +3,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.testutils.JOSMTestRules; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; @@ -25,6 +26,7 @@ public class TagCorrectionTest { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(TagCorrection.class).usingGetClass().verify(); } } diff --git a/test/unit/org/openstreetmap/josm/data/gpx/GpxDataTest.java b/test/unit/org/openstreetmap/josm/data/gpx/GpxDataTest.java index 855ce8cfae..2a25877a56 100644 --- a/test/unit/org/openstreetmap/josm/data/gpx/GpxDataTest.java +++ b/test/unit/org/openstreetmap/josm/data/gpx/GpxDataTest.java @@ -19,6 +19,7 @@ import org.junit.Rule; import org.junit.Test; import org.openstreetmap.josm.Main; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.data.Bounds; import org.openstreetmap.josm.data.DataSource; import org.openstreetmap.josm.data.coor.EastNorth; @@ -444,6 +445,7 @@ private static GpxRoute singleWaypointRoute() { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(GpxData.class).usingGetClass() .withIgnoredFields("attr", "creator", "fromServer", "storageFile", "listeners", "tracks", "routes", "waypoints", "proxy") .withPrefabValues(WayPoint.class, new WayPoint(LatLon.NORTH_POLE), new WayPoint(LatLon.SOUTH_POLE)) diff --git a/test/unit/org/openstreetmap/josm/data/gpx/GpxRouteTest.java b/test/unit/org/openstreetmap/josm/data/gpx/GpxRouteTest.java index d3a69daeb3..7e9fa8cd3a 100644 --- a/test/unit/org/openstreetmap/josm/data/gpx/GpxRouteTest.java +++ b/test/unit/org/openstreetmap/josm/data/gpx/GpxRouteTest.java @@ -3,6 +3,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.data.coor.LatLon; import org.openstreetmap.josm.testutils.JOSMTestRules; @@ -27,6 +28,7 @@ public class GpxRouteTest { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(GpxRoute.class).usingGetClass() .suppress(Warning.NONFINAL_FIELDS) .withPrefabValues(WayPoint.class, new WayPoint(LatLon.NORTH_POLE), new WayPoint(LatLon.SOUTH_POLE)) diff --git a/test/unit/org/openstreetmap/josm/data/gpx/ImmutableGpxTrackSegmentTest.java b/test/unit/org/openstreetmap/josm/data/gpx/ImmutableGpxTrackSegmentTest.java index 5727064fca..2c3abf123a 100644 --- a/test/unit/org/openstreetmap/josm/data/gpx/ImmutableGpxTrackSegmentTest.java +++ b/test/unit/org/openstreetmap/josm/data/gpx/ImmutableGpxTrackSegmentTest.java @@ -3,6 +3,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.data.coor.LatLon; import org.openstreetmap.josm.testutils.JOSMTestRules; @@ -26,6 +27,7 @@ public class ImmutableGpxTrackSegmentTest { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(ImmutableGpxTrackSegment.class).usingGetClass() .withIgnoredFields("bounds", "length") .withPrefabValues(WayPoint.class, new WayPoint(LatLon.NORTH_POLE), new WayPoint(LatLon.SOUTH_POLE)) diff --git a/test/unit/org/openstreetmap/josm/data/gpx/ImmutableGpxTrackTest.java b/test/unit/org/openstreetmap/josm/data/gpx/ImmutableGpxTrackTest.java index 5cd7dccdb1..bb4e58f0fc 100644 --- a/test/unit/org/openstreetmap/josm/data/gpx/ImmutableGpxTrackTest.java +++ b/test/unit/org/openstreetmap/josm/data/gpx/ImmutableGpxTrackTest.java @@ -3,6 +3,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.testutils.JOSMTestRules; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; @@ -26,6 +27,7 @@ public class ImmutableGpxTrackTest { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(ImmutableGpxTrack.class).usingGetClass() .suppress(Warning.NONFINAL_FIELDS) .withIgnoredFields("bounds", "length") diff --git a/test/unit/org/openstreetmap/josm/data/gpx/WayPointTest.java b/test/unit/org/openstreetmap/josm/data/gpx/WayPointTest.java index 01f3fef4a3..3152a147ee 100644 --- a/test/unit/org/openstreetmap/josm/data/gpx/WayPointTest.java +++ b/test/unit/org/openstreetmap/josm/data/gpx/WayPointTest.java @@ -5,6 +5,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.testutils.JOSMTestRules; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; @@ -28,6 +29,7 @@ public class WayPointTest { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(WayPoint.class).usingGetClass() .suppress(Warning.NONFINAL_FIELDS) .withIgnoredFields("customColoring", "dir", "drawLine", "east", "north", "eastNorthCacheKey") diff --git a/test/unit/org/openstreetmap/josm/data/gpx/WithAttributesTest.java b/test/unit/org/openstreetmap/josm/data/gpx/WithAttributesTest.java index 09b29c403b..468a2e6eef 100644 --- a/test/unit/org/openstreetmap/josm/data/gpx/WithAttributesTest.java +++ b/test/unit/org/openstreetmap/josm/data/gpx/WithAttributesTest.java @@ -3,6 +3,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.testutils.JOSMTestRules; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; @@ -26,6 +27,7 @@ public class WithAttributesTest { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(WithAttributes.class).usingGetClass() .suppress(Warning.NONFINAL_FIELDS) .verify(); diff --git a/test/unit/org/openstreetmap/josm/data/notes/NoteTest.java b/test/unit/org/openstreetmap/josm/data/notes/NoteTest.java index e41736b0c6..7c3ccab198 100644 --- a/test/unit/org/openstreetmap/josm/data/notes/NoteTest.java +++ b/test/unit/org/openstreetmap/josm/data/notes/NoteTest.java @@ -8,6 +8,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.data.coor.LatLon; import org.openstreetmap.josm.testutils.JOSMTestRules; @@ -57,6 +58,7 @@ public void testUpdateWith() { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(Note.class).usingGetClass() .withIgnoredFields("latLon", "createdAt", "closedAt", "state", "comments") .suppress(Warning.NONFINAL_FIELDS) diff --git a/test/unit/org/openstreetmap/josm/data/oauth/OAuthParametersTest.java b/test/unit/org/openstreetmap/josm/data/oauth/OAuthParametersTest.java index 868207c172..4e70313b63 100644 --- a/test/unit/org/openstreetmap/josm/data/oauth/OAuthParametersTest.java +++ b/test/unit/org/openstreetmap/josm/data/oauth/OAuthParametersTest.java @@ -8,6 +8,7 @@ import org.junit.Rule; import org.junit.Test; import org.openstreetmap.josm.Main; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.io.OsmApi; import org.openstreetmap.josm.testutils.JOSMTestRules; import org.openstreetmap.josm.tools.Logging; @@ -60,6 +61,7 @@ public void testCreateFromPreferences() { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(OAuthParameters.class).usingGetClass().verify(); } } diff --git a/test/unit/org/openstreetmap/josm/data/oauth/OAuthTokenTest.java b/test/unit/org/openstreetmap/josm/data/oauth/OAuthTokenTest.java index e982591f9a..2b75488e90 100644 --- a/test/unit/org/openstreetmap/josm/data/oauth/OAuthTokenTest.java +++ b/test/unit/org/openstreetmap/josm/data/oauth/OAuthTokenTest.java @@ -5,6 +5,7 @@ import static org.junit.Assert.assertNotNull; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import nl.jqno.equalsverifier.EqualsVerifier; import oauth.signpost.OAuthConsumer; @@ -33,6 +34,7 @@ public void testCreateToken() { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(OAuthToken.class).usingGetClass().verify(); } } diff --git a/test/unit/org/openstreetmap/josm/data/osm/BBoxTest.java b/test/unit/org/openstreetmap/josm/data/osm/BBoxTest.java index 9984321f07..57abe2ba1b 100644 --- a/test/unit/org/openstreetmap/josm/data/osm/BBoxTest.java +++ b/test/unit/org/openstreetmap/josm/data/osm/BBoxTest.java @@ -7,6 +7,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.data.coor.LatLon; import org.openstreetmap.josm.testutils.JOSMTestRules; @@ -31,6 +32,7 @@ public class BBoxTest { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(BBox.class).usingGetClass() .suppress(Warning.NONFINAL_FIELDS) .verify(); diff --git a/test/unit/org/openstreetmap/josm/data/osm/FilterTest.java b/test/unit/org/openstreetmap/josm/data/osm/FilterTest.java index 730b8af434..d4d4d6db71 100644 --- a/test/unit/org/openstreetmap/josm/data/osm/FilterTest.java +++ b/test/unit/org/openstreetmap/josm/data/osm/FilterTest.java @@ -15,6 +15,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.data.coor.LatLon; import org.openstreetmap.josm.data.osm.Filter.FilterPreferenceEntry; import org.openstreetmap.josm.data.osm.search.SearchMode; @@ -241,6 +242,7 @@ public void testFilterPreferenceEntry() { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(FilterPreferenceEntry.class).usingGetClass() .suppress(Warning.NONFINAL_FIELDS) .verify(); diff --git a/test/unit/org/openstreetmap/josm/data/osm/StorageTest.java b/test/unit/org/openstreetmap/josm/data/osm/StorageTest.java index c5deef1a0c..c05373804f 100644 --- a/test/unit/org/openstreetmap/josm/data/osm/StorageTest.java +++ b/test/unit/org/openstreetmap/josm/data/osm/StorageTest.java @@ -3,6 +3,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.testutils.JOSMTestRules; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; @@ -26,6 +27,7 @@ public class StorageTest { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(Storage.class).usingGetClass() .suppress(Warning.NONFINAL_FIELDS) .withIgnoredFields("arrayCopyNecessary", "hash", "mask", "modCount", "safeIterator", "size") diff --git a/test/unit/org/openstreetmap/josm/data/tagging/ac/AutoCompletionPriorityTest.java b/test/unit/org/openstreetmap/josm/data/tagging/ac/AutoCompletionPriorityTest.java index 4ebc8151d0..0919fdb9d4 100644 --- a/test/unit/org/openstreetmap/josm/data/tagging/ac/AutoCompletionPriorityTest.java +++ b/test/unit/org/openstreetmap/josm/data/tagging/ac/AutoCompletionPriorityTest.java @@ -13,6 +13,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.testutils.JOSMTestRules; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; @@ -95,6 +96,7 @@ public void testOrdering() { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(AutoCompletionPriority.class).usingGetClass() .verify(); } diff --git a/test/unit/org/openstreetmap/josm/gui/MapStatusTest.java b/test/unit/org/openstreetmap/josm/gui/MapStatusTest.java index c0929e9a60..d42b5e84a2 100644 --- a/test/unit/org/openstreetmap/josm/gui/MapStatusTest.java +++ b/test/unit/org/openstreetmap/josm/gui/MapStatusTest.java @@ -3,6 +3,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.testutils.JOSMTestRules; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; @@ -25,6 +26,7 @@ public class MapStatusTest { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(MapStatus.StatusTextHistory.class).withIgnoredFields("text").verify(); } } diff --git a/test/unit/org/openstreetmap/josm/gui/preferences/advanced/PrefEntryTest.java b/test/unit/org/openstreetmap/josm/gui/preferences/advanced/PrefEntryTest.java index 1c900929b8..35ffd47995 100644 --- a/test/unit/org/openstreetmap/josm/gui/preferences/advanced/PrefEntryTest.java +++ b/test/unit/org/openstreetmap/josm/gui/preferences/advanced/PrefEntryTest.java @@ -8,6 +8,7 @@ import org.junit.BeforeClass; import org.junit.Test; import org.openstreetmap.josm.JOSMFixture; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.spi.preferences.StringSetting; import nl.jqno.equalsverifier.EqualsVerifier; @@ -54,6 +55,7 @@ public void testPrefEntry() { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(PrefEntry.class).usingGetClass() .withIgnoredFields("value", "defaultValue", "isDefault", "changed") .verify(); diff --git a/test/unit/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionManagerTest.java b/test/unit/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionManagerTest.java index 2c3f2cfb61..f8ed7dd14e 100644 --- a/test/unit/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionManagerTest.java +++ b/test/unit/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionManagerTest.java @@ -3,6 +3,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionManager.UserInputTag; import org.openstreetmap.josm.testutils.JOSMTestRules; @@ -26,6 +27,7 @@ public class AutoCompletionManagerTest { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(UserInputTag.class).usingGetClass() .verify(); } diff --git a/test/unit/org/openstreetmap/josm/gui/util/WindowGeometryTest.java b/test/unit/org/openstreetmap/josm/gui/util/WindowGeometryTest.java index c05f54274f..0ae22bd72b 100644 --- a/test/unit/org/openstreetmap/josm/gui/util/WindowGeometryTest.java +++ b/test/unit/org/openstreetmap/josm/gui/util/WindowGeometryTest.java @@ -15,6 +15,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.gui.util.WindowGeometry.WindowGeometryException; import org.openstreetmap.josm.spi.preferences.Config; import org.openstreetmap.josm.testutils.JOSMTestRules; @@ -146,6 +147,7 @@ public void testToString() { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(WindowGeometry.class).usingGetClass() .suppress(Warning.NONFINAL_FIELDS) .verify(); diff --git a/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTest.java b/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTest.java index 2ca0a8bc30..4ea5d890d8 100644 --- a/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTest.java +++ b/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTest.java @@ -13,6 +13,7 @@ import org.junit.Rule; import org.junit.Test; import org.openstreetmap.josm.Main; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.gui.preferences.plugin.PluginPreferenceTest; import org.openstreetmap.josm.plugins.PluginHandler.DeprecatedPlugin; import org.openstreetmap.josm.plugins.PluginHandler.PluginInformationAction; @@ -39,6 +40,7 @@ public class PluginHandlerTest { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(DeprecatedPlugin.class).usingGetClass().verify(); } diff --git a/test/unit/org/openstreetmap/josm/spi/preferences/ListListSettingTest.java b/test/unit/org/openstreetmap/josm/spi/preferences/ListListSettingTest.java index c0886ca3d7..3e8761642a 100644 --- a/test/unit/org/openstreetmap/josm/spi/preferences/ListListSettingTest.java +++ b/test/unit/org/openstreetmap/josm/spi/preferences/ListListSettingTest.java @@ -3,6 +3,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.testutils.JOSMTestRules; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; @@ -24,6 +25,7 @@ public class ListListSettingTest { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(ListListSetting.class).usingGetClass() .withIgnoredFields("isNew", "time") .verify(); diff --git a/test/unit/org/openstreetmap/josm/spi/preferences/ListSettingTest.java b/test/unit/org/openstreetmap/josm/spi/preferences/ListSettingTest.java index cb934ce65d..ac971f60f3 100644 --- a/test/unit/org/openstreetmap/josm/spi/preferences/ListSettingTest.java +++ b/test/unit/org/openstreetmap/josm/spi/preferences/ListSettingTest.java @@ -3,6 +3,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.testutils.JOSMTestRules; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; @@ -24,6 +25,7 @@ public class ListSettingTest { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(ListSetting.class).usingGetClass() .withIgnoredFields("isNew", "time") .verify(); diff --git a/test/unit/org/openstreetmap/josm/spi/preferences/MapListSettingTest.java b/test/unit/org/openstreetmap/josm/spi/preferences/MapListSettingTest.java index 953f74b7e8..f44c00b4aa 100644 --- a/test/unit/org/openstreetmap/josm/spi/preferences/MapListSettingTest.java +++ b/test/unit/org/openstreetmap/josm/spi/preferences/MapListSettingTest.java @@ -3,6 +3,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.testutils.JOSMTestRules; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; @@ -24,6 +25,7 @@ public class MapListSettingTest { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(MapListSetting.class).usingGetClass() .withIgnoredFields("isNew", "time") .verify(); diff --git a/test/unit/org/openstreetmap/josm/spi/preferences/StringSettingTest.java b/test/unit/org/openstreetmap/josm/spi/preferences/StringSettingTest.java index 03932e7710..aba555e03e 100644 --- a/test/unit/org/openstreetmap/josm/spi/preferences/StringSettingTest.java +++ b/test/unit/org/openstreetmap/josm/spi/preferences/StringSettingTest.java @@ -3,6 +3,7 @@ import org.junit.Rule; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import org.openstreetmap.josm.testutils.JOSMTestRules; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; @@ -24,6 +25,7 @@ public class StringSettingTest { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(StringSetting.class).usingGetClass() .withIgnoredFields("isNew", "time") .verify(); diff --git a/test/unit/org/openstreetmap/josm/tools/MultiMapTest.java b/test/unit/org/openstreetmap/josm/tools/MultiMapTest.java index f0654f364b..eedbe3348e 100644 --- a/test/unit/org/openstreetmap/josm/tools/MultiMapTest.java +++ b/test/unit/org/openstreetmap/josm/tools/MultiMapTest.java @@ -7,8 +7,10 @@ import java.util.Arrays; import java.util.HashSet; -import nl.jqno.equalsverifier.EqualsVerifier; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; + +import nl.jqno.equalsverifier.EqualsVerifier; /** * Unit tests of {@link MultiMap} class. @@ -20,6 +22,7 @@ public class MultiMapTest { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(MultiMap.class).usingGetClass().verify(); } diff --git a/test/unit/org/openstreetmap/josm/tools/PairTest.java b/test/unit/org/openstreetmap/josm/tools/PairTest.java index 23a7bbc5f5..7505bc0c8f 100644 --- a/test/unit/org/openstreetmap/josm/tools/PairTest.java +++ b/test/unit/org/openstreetmap/josm/tools/PairTest.java @@ -2,6 +2,7 @@ package org.openstreetmap.josm.tools; import org.junit.Test; +import org.openstreetmap.josm.TestUtils; import nl.jqno.equalsverifier.EqualsVerifier; import nl.jqno.equalsverifier.Warning; @@ -16,6 +17,7 @@ public class PairTest { */ @Test public void testEqualsContract() { + TestUtils.assumeWorkingEqualsVerifier(); EqualsVerifier.forClass(Pair.class).suppress(Warning.NONFINAL_FIELDS).verify(); } }