!7 Fixed compilation failures caused by hamcrest upgrade
From: @lyn1001 Reviewed-by: @cherry530 Signed-off-by: @cherry530
This commit is contained in:
commit
c7e1e3888d
75
0004-Port-to-hamcrest-2.1.patch
Normal file
75
0004-Port-to-hamcrest-2.1.patch
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
From 5393d71f7bf9de06efd763c501486bf14413ab4a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Marian Koncek <mkoncek@redhat.com>
|
||||||
|
Date: Thu, 29 Aug 2019 15:18:53 +0200
|
||||||
|
Subject: [PATCH] Port to hamcrest 2.1
|
||||||
|
|
||||||
|
---
|
||||||
|
.../tests2/EasyMockSupportClassTest.java | 18 +++++++++---------
|
||||||
|
1 file changed, 9 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/core/src/test/java/org/easymock/tests2/EasyMockSupportClassTest.java b/core/src/test/java/org/easymock/tests2/EasyMockSupportClassTest.java
|
||||||
|
index c5dd63b..b8be307 100644
|
||||||
|
--- a/core/src/test/java/org/easymock/tests2/EasyMockSupportClassTest.java
|
||||||
|
+++ b/core/src/test/java/org/easymock/tests2/EasyMockSupportClassTest.java
|
||||||
|
@@ -48,49 +48,49 @@ public class EasyMockSupportClassTest extends EasyMockSupport {
|
||||||
|
@Test
|
||||||
|
public void testCreateStrictControl() {
|
||||||
|
IMocksControl ctrl = createStrictControl();
|
||||||
|
- assertThat(ctrl.createMock(ToMock.class), is(ToMock.class));
|
||||||
|
+ assertThat(ctrl.createMock(ToMock.class), org.hamcrest.core.Is.isA(ToMock.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testCreateControl() {
|
||||||
|
IMocksControl ctrl = createControl();
|
||||||
|
- assertThat(ctrl.createMock(ToMock.class), is(ToMock.class));
|
||||||
|
+ assertThat(ctrl.createMock(ToMock.class), org.hamcrest.core.Is.isA(ToMock.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testCreateNiceControl() {
|
||||||
|
IMocksControl ctrl = createNiceControl();
|
||||||
|
- assertThat(ctrl.createMock(ToMock.class), is(ToMock.class));
|
||||||
|
+ assertThat(ctrl.createMock(ToMock.class), org.hamcrest.core.Is.isA(ToMock.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testCreateStrictMockClassOfT() {
|
||||||
|
- assertThat(createStrictMock(ToMock.class), is(ToMock.class));
|
||||||
|
+ assertThat(createStrictMock(ToMock.class), org.hamcrest.core.Is.isA(ToMock.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testCreateStrictMockStringClassOfT() {
|
||||||
|
- assertThat(createStrictMock("myMock", ToMock.class), is(ToMock.class));
|
||||||
|
+ assertThat(createStrictMock("myMock", ToMock.class), org.hamcrest.core.Is.isA(ToMock.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testCreateMockClassOfT() {
|
||||||
|
- assertThat(createMock(ToMock.class), is(ToMock.class));
|
||||||
|
+ assertThat(createMock(ToMock.class), org.hamcrest.core.Is.isA(ToMock.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testCreateMockStringClassOfT() {
|
||||||
|
- assertThat(createMock("myMock", ToMock.class), is(ToMock.class));
|
||||||
|
+ assertThat(createMock("myMock", ToMock.class), org.hamcrest.core.Is.isA(ToMock.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testCreateNiceMockClassOfT() {
|
||||||
|
- assertThat(createNiceMock(ToMock.class), is(ToMock.class));
|
||||||
|
+ assertThat(createNiceMock(ToMock.class), org.hamcrest.core.Is.isA(ToMock.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testCreateNiceMockStringClassOfT() {
|
||||||
|
- assertThat(createNiceMock("myMock", ToMock.class), is(ToMock.class));
|
||||||
|
+ assertThat(createNiceMock("myMock", ToMock.class), org.hamcrest.core.Is.isA(ToMock.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
--
|
||||||
|
2.21.0
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: easymock
|
Name: easymock
|
||||||
Version: 3.6
|
Version: 3.6
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Easy mock objects
|
Summary: Easy mock objects
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: http://www.easymock.org
|
URL: http://www.easymock.org
|
||||||
@ -8,6 +8,7 @@ Source0: https://github.com/easymock/easymock/archive/easymock-%{ver
|
|||||||
Patch1: 0001-Disable-android-support.patch
|
Patch1: 0001-Disable-android-support.patch
|
||||||
Patch2: 0002-Unshade-cglib-and-asm.patch
|
Patch2: 0002-Unshade-cglib-and-asm.patch
|
||||||
Patch3: 0003-Fix-OSGi-manifest.patch
|
Patch3: 0003-Fix-OSGi-manifest.patch
|
||||||
|
Patch4: 0004-Port-to-hamcrest-2.1.patch
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: maven-local mvn(cglib:cglib) mvn(junit:junit)
|
BuildRequires: maven-local mvn(cglib:cglib) mvn(junit:junit)
|
||||||
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
|
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
|
||||||
@ -69,6 +70,9 @@ rm core/src/test/java/org/easymock/tests2/ClassExtensionHelperTest.java
|
|||||||
%license core/LICENSE.txt
|
%license core/LICENSE.txt
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Sep 27 2023 liyanan <thistleslyn@163.com> - 3.6-2
|
||||||
|
- Fixed compilation failures caused by hamcrest upgrade
|
||||||
|
|
||||||
* Thu Aug 13 2020 yanan li <liyanan032@huawei.com> - 3.6-1
|
* Thu Aug 13 2020 yanan li <liyanan032@huawei.com> - 3.6-1
|
||||||
- Update to 3.6-1
|
- Update to 3.6-1
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user