Skip to content

Commit

Permalink
[172] Switch to Hamcrest 2.2.0
Browse files Browse the repository at this point in the history
Hamcrest 1.3 dates from 2012. Even 2.2, which is currently the latest,
was released in 2019.

Bug: #172
Signed-off-by: Pierre-Charles David <[email protected]>
  • Loading branch information
pcdavid authored and mPorhel committed Feb 20, 2024
1 parent b53c572 commit 4fa82ae
Show file tree
Hide file tree
Showing 14 changed files with 64 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.swtbot.eclipse.finder;visibility:=reexport,
org.eclipse.swtbot.swt.finder;visibility:=reexport,
org.eclipse.swtbot.eclipse.gef.finder;bundle-version="2.0.5",
org.hamcrest.core;bundle-version="[1.3.0,2.0.0)",
org.hamcrest.library;bundle-version="[1.3.0,2.0.0)",
org.hamcrest;bundle-version="[2.2.0,3.0.0)",
org.apache.log4j;bundle-version="1.2.13",
org.eclipse.draw2d;bundle-version="3.4.2",
org.eclipse.gef;bundle-version="3.4.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import org.eclipse.draw2d.geometry.Point;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
import org.hamcrest.Factory;
import org.hamcrest.Matcher;

/**
Expand Down Expand Up @@ -61,7 +60,7 @@ public boolean matches(Object item) {
* @param expected
* Expected point.
* @param actual
* ctual point
* Actual point
* @param distance
* Distance to check.
* @return <code>true</code> if actual point is around expected point.
Expand Down Expand Up @@ -89,7 +88,6 @@ public void describeTo(Description description) {
* Distance between.
* @return Matcher.
*/
@Factory
public static Matcher<Point> around(Point expected, int distance) {
return new PointAround(expected, distance);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import org.eclipse.draw2d.geometry.Rectangle;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
import org.hamcrest.Factory;
import org.hamcrest.Matcher;

/**
Expand Down Expand Up @@ -80,7 +79,6 @@ public void describeTo(Description description) {
* Distance between.
* @return Matcher.
*/
@Factory
public static Matcher<Rectangle> around(Rectangle expected, int distance) {
return new RectangleAround(expected, distance);
}
Expand Down
3 changes: 1 addition & 2 deletions plugins/org.eclipse.sirius.tests.swtbot/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.swtbot.eclipse.gef.finder;bundle-version="0.1.0",
org.junit;bundle-version="[4.0.0,5.0.0)",
org.apache.log4j;bundle-version="[1.2.0,1.3.0)",
org.hamcrest.core;bundle-version="[1.3.0,2.0.0)",
org.hamcrest.library;bundle-version="[1.3.0,2.0.0)",
org.hamcrest;bundle-version="[2.2.0,3.0.0)",
org.eclipse.emf.ecore,
org.eclipse.sirius,
org.eclipse.sirius.ui,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
<target name="sirius_capella_2023-03" sequenceNumber="1707401172">
<target name="sirius_capella_2023-03" sequenceNumber="1707492985">
<locations>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.easymock" version="0.0.0"/>
<repository id="Orbit-2022-03" location="https://download.eclipse.org/tools/orbit/downloads/drops/R20220302172233/repository/"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.apache.log4j" version="0.0.0"/>
<unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/>
<unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/>
<unit id="org.junit" version="0.0.0"/>
<unit id="org.antlr.runtime" version="4.7.2.v20221112-0806"/>
<repository id="Orbit-2023-03" location="https://download.eclipse.org/tools/orbit/downloads/drops/R20230302014618/repository/"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.hamcrest.core" version="2.2.0.v20230809-1000"/>
<unit id="org.hamcrest.library" version="2.2.0.v20230809-1000"/>
<repository id="Orbit-2023-12" location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/2023-12"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.eclipse.swtbot.eclipse.feature.group" version="3.1.0.202106041005"/>
<unit id="org.eclipse.swtbot.eclipse.gef.feature.group" version="3.1.0.202106041005"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
<target name="sirius_headless_photon" sequenceNumber="1707401172">
<target name="sirius_headless_photon" sequenceNumber="1707492985">
<locations>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.easymock" version="0.0.0"/>
<repository id="Orbit-2022-03" location="https://download.eclipse.org/tools/orbit/downloads/drops/R20220302172233/repository/"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.apache.log4j" version="0.0.0"/>
<unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/>
<unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/>
<unit id="org.junit" version="0.0.0"/>
<unit id="org.antlr.runtime" version="4.7.2.v20221112-0806"/>
<repository id="Orbit-2023-03" location="https://download.eclipse.org/tools/orbit/downloads/drops/R20230302014618/repository/"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.hamcrest.core" version="2.2.0.v20230809-1000"/>
<unit id="org.hamcrest.library" version="2.2.0.v20230809-1000"/>
<repository id="Orbit-2023-12" location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/2023-12"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.eclipse.elk.sdk.feature.feature.group" version="0.0.0"/>
<unit id="org.eclipse.elk.sdk.feature.source.feature.group" version="0.0.0"/>
Expand Down
18 changes: 11 additions & 7 deletions releng/org.eclipse.sirius.targets/modules/orbit.tpd
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
target "orbit" with source, requirements
target "orbit" with source , requirements

location Orbit-2022-03 "https://download.eclipse.org/tools/orbit/downloads/drops/R20220302172233/repository/" {
org.easymock lazy
org.easymock lazy
}

location Orbit-2023-03 "https://download.eclipse.org/tools/orbit/downloads/drops/R20230302014618/repository/" {
org.apache.log4j lazy
org.hamcrest.core [1.3.0,1.3.1)
org.hamcrest.library [1.3.0,1.3.1)
org.junit lazy
org.antlr.runtime [4.7.2,4.7.3)
org.apache.log4j lazy
org.junit lazy
org.antlr.runtime [4.7.2,4.7.3)
}

location Orbit-2023-12 "https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/2023-12" {
org.hamcrest.core [2.2.0,3.0.0)
org.hamcrest.library [2.2.0,3.0.0)
}
9 changes: 6 additions & 3 deletions releng/org.eclipse.sirius.targets/sirius_2022-09.target
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
<target name="sirius_2022-09" sequenceNumber="1707401172">
<target name="sirius_2022-09" sequenceNumber="1707492985">
<locations>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.easymock" version="0.0.0"/>
<repository id="Orbit-2022-03" location="https://download.eclipse.org/tools/orbit/downloads/drops/R20220302172233/repository/"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.apache.log4j" version="0.0.0"/>
<unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/>
<unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/>
<unit id="org.junit" version="0.0.0"/>
<unit id="org.antlr.runtime" version="4.7.2.v20221112-0806"/>
<repository id="Orbit-2023-03" location="https://download.eclipse.org/tools/orbit/downloads/drops/R20230302014618/repository/"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.hamcrest.core" version="2.2.0.v20230809-1000"/>
<unit id="org.hamcrest.library" version="2.2.0.v20230809-1000"/>
<repository id="Orbit-2023-12" location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/2023-12"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.eclipse.swtbot.eclipse.feature.group" version="3.1.0.202106041005"/>
<unit id="org.eclipse.swtbot.eclipse.gef.feature.group" version="3.1.0.202106041005"/>
Expand Down
9 changes: 6 additions & 3 deletions releng/org.eclipse.sirius.targets/sirius_2022-12.target
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
<target name="sirius_2022-12" sequenceNumber="1707401172">
<target name="sirius_2022-12" sequenceNumber="1707492985">
<locations>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.easymock" version="0.0.0"/>
<repository id="Orbit-2022-03" location="https://download.eclipse.org/tools/orbit/downloads/drops/R20220302172233/repository/"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.apache.log4j" version="0.0.0"/>
<unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/>
<unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/>
<unit id="org.junit" version="0.0.0"/>
<unit id="org.antlr.runtime" version="4.7.2.v20221112-0806"/>
<repository id="Orbit-2023-03" location="https://download.eclipse.org/tools/orbit/downloads/drops/R20230302014618/repository/"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.hamcrest.core" version="2.2.0.v20230809-1000"/>
<unit id="org.hamcrest.library" version="2.2.0.v20230809-1000"/>
<repository id="Orbit-2023-12" location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/2023-12"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.eclipse.swtbot.eclipse.feature.group" version="3.1.0.202106041005"/>
<unit id="org.eclipse.swtbot.eclipse.gef.feature.group" version="3.1.0.202106041005"/>
Expand Down
9 changes: 6 additions & 3 deletions releng/org.eclipse.sirius.targets/sirius_2023-03.target
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
<target name="sirius_2023-03" sequenceNumber="1707401172">
<target name="sirius_2023-03" sequenceNumber="1707492985">
<locations>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.easymock" version="0.0.0"/>
<repository id="Orbit-2022-03" location="https://download.eclipse.org/tools/orbit/downloads/drops/R20220302172233/repository/"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.apache.log4j" version="0.0.0"/>
<unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/>
<unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/>
<unit id="org.junit" version="0.0.0"/>
<unit id="org.antlr.runtime" version="4.7.2.v20221112-0806"/>
<repository id="Orbit-2023-03" location="https://download.eclipse.org/tools/orbit/downloads/drops/R20230302014618/repository/"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.hamcrest.core" version="2.2.0.v20230809-1000"/>
<unit id="org.hamcrest.library" version="2.2.0.v20230809-1000"/>
<repository id="Orbit-2023-12" location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/2023-12"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.eclipse.swtbot.eclipse.feature.group" version="3.1.0.202106041005"/>
<unit id="org.eclipse.swtbot.eclipse.gef.feature.group" version="3.1.0.202106041005"/>
Expand Down
9 changes: 6 additions & 3 deletions releng/org.eclipse.sirius.targets/sirius_2023-06.target
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
<target name="sirius_2023-06" sequenceNumber="1707401175">
<target name="sirius_2023-06" sequenceNumber="1707492985">
<locations>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.easymock" version="0.0.0"/>
<repository id="Orbit-2022-03" location="https://download.eclipse.org/tools/orbit/downloads/drops/R20220302172233/repository/"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.apache.log4j" version="0.0.0"/>
<unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/>
<unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/>
<unit id="org.junit" version="0.0.0"/>
<unit id="org.antlr.runtime" version="4.7.2.v20221112-0806"/>
<repository id="Orbit-2023-03" location="https://download.eclipse.org/tools/orbit/downloads/drops/R20230302014618/repository/"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.hamcrest.core" version="2.2.0.v20230809-1000"/>
<unit id="org.hamcrest.library" version="2.2.0.v20230809-1000"/>
<repository id="Orbit-2023-12" location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/2023-12"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.eclipse.swtbot.eclipse.feature.group" version="3.1.0.202106041005"/>
<unit id="org.eclipse.swtbot.eclipse.gef.feature.group" version="3.1.0.202106041005"/>
Expand Down
9 changes: 6 additions & 3 deletions releng/org.eclipse.sirius.targets/sirius_2023-09.target
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
<target name="sirius_2023-09" sequenceNumber="1707401176">
<target name="sirius_2023-09" sequenceNumber="1707492985">
<locations>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.easymock" version="0.0.0"/>
<repository id="Orbit-2022-03" location="https://download.eclipse.org/tools/orbit/downloads/drops/R20220302172233/repository/"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.apache.log4j" version="0.0.0"/>
<unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/>
<unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/>
<unit id="org.junit" version="0.0.0"/>
<unit id="org.antlr.runtime" version="4.7.2.v20221112-0806"/>
<repository id="Orbit-2023-03" location="https://download.eclipse.org/tools/orbit/downloads/drops/R20230302014618/repository/"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.hamcrest.core" version="2.2.0.v20230809-1000"/>
<unit id="org.hamcrest.library" version="2.2.0.v20230809-1000"/>
<repository id="Orbit-2023-12" location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/2023-12"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.eclipse.swtbot.eclipse.feature.group" version="3.1.0.202106041005"/>
<unit id="org.eclipse.swtbot.eclipse.gef.feature.group" version="3.1.0.202106041005"/>
Expand Down
9 changes: 6 additions & 3 deletions releng/org.eclipse.sirius.targets/sirius_2023-12.target
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
<target name="sirius_2023-12" sequenceNumber="1704213407">
<target name="sirius_2023-12" sequenceNumber="1706537546">
<locations>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.easymock" version="0.0.0"/>
<repository id="Orbit-2022-03" location="https://download.eclipse.org/tools/orbit/downloads/drops/R20220302172233/repository/"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.apache.log4j" version="0.0.0"/>
<unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/>
<unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/>
<unit id="org.junit" version="0.0.0"/>
<unit id="org.antlr.runtime" version="4.7.2.v20221112-0806"/>
<repository id="Orbit-2023-03" location="https://download.eclipse.org/tools/orbit/downloads/drops/R20230302014618/repository/"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.hamcrest.core" version="2.2.0.v20230809-1000"/>
<unit id="org.hamcrest.library" version="2.2.0.v20230809-1000"/>
<repository id="Orbit-2023-12" location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/2023-12"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.eclipse.swtbot.eclipse.feature.group" version="3.1.0.202106041005"/>
<unit id="org.eclipse.swtbot.eclipse.gef.feature.group" version="3.1.0.202106041005"/>
Expand Down
4 changes: 2 additions & 2 deletions releng/org.eclipse.sirius.targets/sirius_canary.target
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
<unit id="ch.qos.logback.classic" version="0.0.0"/>
<unit id="ch.qos.logback.core" version="0.0.0"/>
<unit id="org.antlr.runtime" version="0.0.0"/>
<unit id="org.hamcrest.core" version="1.3.0.v20230809-1000"/>
<unit id="org.hamcrest.library" version="1.3.0.v20230809-1000"/>
<unit id="org.hamcrest.core" version="2.2.0.v20230809-1000"/>
<unit id="org.hamcrest.library" version="2.2.0.v20230809-1000"/>
<repository id="Orbit-latest-I" location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/nightly"/>
</location>
<location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
Expand Down

0 comments on commit 4fa82ae

Please sign in to comment.