Update to version 3.5.5.

This commit is contained in:
Jerry James 2020-08-23 12:54:44 -06:00
parent 3ae05b70a2
commit 83a7ac830e
6 changed files with 61 additions and 66 deletions

View File

@ -1,29 +0,0 @@
--- conf/mockito-core.bnd.orig 2014-12-31 16:43:56.000000000 +0000
+++ conf/mockito-core.bnd 2015-09-01 19:36:18.534549995 +0100
@@ -1,21 +1,19 @@
--versionpolicy=[${version;==;${@}},${version;+;${@}})
-
-Bundle-Name= Mockito Mock Library for Java. Core bundle requires Hamcrest-core and Objenesis.
+Bundle-Name= Mockito Mock Library for Java.
Bundle-SymbolicName= org.mockito.mockito-core
Bundle-Version= ${version}
Export-Package= !org.mockito.asm.*, \
!org.mockito.cglib.*, \
!org.mockito.internal.*, \
- org.mockito.*;version=${version}
+ org.mockito.*
Import-Package= junit.*;resolution:=optional, \
org.junit.*;resolution:=optional, \
org.apache.tools.ant.*;resolution:=optional, \
- org.hamcrest;version="[1.0,3.0)", \
- org.objenesis;version="[2.1,3.0)", \
+ org.objenesis;version="[1.0,3.0)", \
org.mockito.asm.signature;resolution:=optional, \
- org.mockito.*
+ org.mockito.*, \
+ net.sf.cglib.core,net.sf.cglib.proxy,net.sf.cglib.reflect
Private-Package: org.mockito.*

View File

@ -1,6 +1,6 @@
#!/bin/bash -ex
VERSION=2.28.2
VERSION=3.5.5
SRCDIR=mockito-${VERSION}
git clone https://github.com/mockito/mockito.git ${SRCDIR}

View File

@ -10,6 +10,10 @@
<description>Mockito mock objects library core API and implementation</description>
<!-- NOTE! This file is loosely based on the mockito-core pom from maven central
but with many additions to allow building and running tests -->
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.ow2.asm</groupId>

View File

@ -1,5 +1,5 @@
Name: mockito
Version: 2.28.2
Version: 3.5.5
Release: 1%{?dist}
Summary: Tasty mocking framework for unit tests in Java
License: MIT
@ -75,6 +75,9 @@ EOF
%license LICENSE
%changelog
* Sun Aug 23 2020 Jerry James <loganjerry@gmail.com> - 3.5.5-1
- Update to version 3.5.5
* Fri Aug 14 2020 Jerry James <loganjerry@gmail.com> - 2.28.2-1
- Update to version 2.28.2

View File

@ -1 +1 @@
SHA512 (mockito-2.28.2.tar.xz) = faed4efd2e02a23f09bab57e56ad35d0302e4334302713d7e807acf3f467f79674428c6a27289cc8f64fd0197a1bef6c9b69926b9baa262306099f4c29c5263b
SHA512 (mockito-3.5.5.tar.xz) = 32acf233ffa670ba240962d5768c85c99b46f339744e4ac5cd67e8f96c3da71c0f5f37eaa4d19749ee11e0c9f32e320e6d3235a0960d76e285a0ed1e97bc4efd

View File

@ -1,6 +1,6 @@
--- src/main/java/org/mockito/internal/creation/bytebuddy/InlineBytecodeGenerator.java.orig 2020-08-14 16:48:03.903053256 -0600
+++ src/main/java/org/mockito/internal/creation/bytebuddy/InlineBytecodeGenerator.java 2020-08-14 16:48:54.171048446 -0600
@@ -18,8 +18,8 @@ import net.bytebuddy.dynamic.ClassFileLo
--- src/main/java/org/mockito/internal/creation/bytebuddy/InlineBytecodeGenerator.java.orig 2020-08-22 14:11:33.000000000 -0600
+++ src/main/java/org/mockito/internal/creation/bytebuddy/InlineBytecodeGenerator.java 2020-08-23 11:55:09.642153410 -0600
@@ -30,8 +30,8 @@ import net.bytebuddy.dynamic.ClassFileLo
import net.bytebuddy.dynamic.scaffold.MethodGraph;
import net.bytebuddy.dynamic.scaffold.TypeValidation;
import net.bytebuddy.implementation.Implementation;
@ -11,58 +11,75 @@
import net.bytebuddy.matcher.ElementMatchers;
import net.bytebuddy.pool.TypePool;
import net.bytebuddy.utility.OpenedClassReader;
--- src/test/java/org/mockitointegration/NoJUnitDependenciesTest.java.orig 2019-05-29 11:38:39.000000000 -0600
+++ src/test/java/org/mockitointegration/NoJUnitDependenciesTest.java 2020-08-14 16:48:03.904053256 -0600
@@ -12,6 +12,7 @@ import org.junit.Test;
--- src/main/java/org/mockito/internal/creation/bytebuddy/MockMethodAdvice.java.orig 2020-08-22 14:11:33.000000000 -0600
+++ src/main/java/org/mockito/internal/creation/bytebuddy/MockMethodAdvice.java 2020-08-23 12:11:54.264163467 -0600
@@ -32,10 +32,10 @@ import net.bytebuddy.implementation.bind
import net.bytebuddy.implementation.bind.annotation.This;
import net.bytebuddy.implementation.bytecode.StackSize;
import net.bytebuddy.implementation.bytecode.assign.Assigner;
-import net.bytebuddy.jar.asm.Label;
-import net.bytebuddy.jar.asm.MethodVisitor;
-import net.bytebuddy.jar.asm.Opcodes;
-import net.bytebuddy.jar.asm.Type;
+import org.objectweb.asm.Label;
+import org.objectweb.asm.MethodVisitor;
+import org.objectweb.asm.Opcodes;
+import org.objectweb.asm.Type;
import net.bytebuddy.pool.TypePool;
import net.bytebuddy.utility.OpenedClassReader;
import org.mockito.exceptions.base.MockitoException;
--- src/test/java/org/mockitointegration/NoJUnitDependenciesTest.java.orig 2020-08-22 14:11:33.000000000 -0600
+++ src/test/java/org/mockitointegration/NoJUnitDependenciesTest.java 2020-08-23 11:56:33.911241836 -0600
@@ -16,6 +16,7 @@ import org.junit.Test;
import org.mockito.Mockito;
import org.mockito.internal.configuration.plugins.Plugins;
import org.mockitoutil.ClassLoaders;
+import org.objectweb.asm.ClassVisitor;
import org.objenesis.Objenesis;
import java.util.Set;
@@ -30,6 +31,7 @@ public class NoJUnitDependenciesTest {
Matcher.class,
ByteBuddy.class,
ByteBuddyAgent.class,
+ ClassVisitor.class,
Objenesis.class
)
.withCodeSourceUrlOf(coverageTool())
--- src/test/java/org/mockito/internal/creation/bytebuddy/AbstractByteBuddyMockMakerTest.java.orig 2019-05-29 11:38:39.000000000 -0600
+++ src/test/java/org/mockito/internal/creation/bytebuddy/AbstractByteBuddyMockMakerTest.java 2020-08-14 16:48:03.904053256 -0600
@@ -19,6 +19,7 @@ import org.mockito.plugins.MockMaker;
public class NoJUnitDependenciesTest {
@@ -32,6 +33,7 @@ public class NoJUnitDependenciesTest {
Matcher.class,
ByteBuddy.class,
ByteBuddyAgent.class,
+ ClassVisitor.class,
Objenesis.class)
.withCodeSourceUrlOf(coverageTool())
.without("junit", "org.junit", "org.opentest4j")
--- src/test/java/org/mockito/internal/creation/bytebuddy/AbstractByteBuddyMockMakerTest.java.orig 2020-08-22 14:11:33.000000000 -0600
+++ src/test/java/org/mockito/internal/creation/bytebuddy/AbstractByteBuddyMockMakerTest.java 2020-08-23 12:00:18.096466359 -0600
@@ -26,6 +26,7 @@ import org.mockito.plugins.MockMaker;
import org.mockito.stubbing.Answer;
import org.mockitoutil.ClassLoaders;
import org.mockitoutil.SimpleSerializationUtil;
+import org.objectweb.asm.ClassVisitor;
import org.objenesis.ObjenesisStd;
import java.io.Serializable;
@@ -138,7 +139,7 @@ public abstract class AbstractByteBuddyM
public void instantiate_fine_when_objenesis_on_the_classpath() throws Exception {
public abstract class AbstractByteBuddyMockMakerTest<MM extends MockMaker> {
@@ -154,7 +155,7 @@ public abstract class AbstractByteBuddyM
// given
ClassLoader classpath_with_objenesis = ClassLoaders.excludingClassLoader()
- .withCodeSourceUrlOf(Mockito.class, ByteBuddy.class, ObjenesisStd.class)
+ .withCodeSourceUrlOf(Mockito.class, ByteBuddy.class, ObjenesisStd.class, ClassVisitor.class)
.withCodeSourceUrlOf(coverageTool())
.build();
ClassLoader classpath_with_objenesis =
ClassLoaders.excludingClassLoader()
- .withCodeSourceUrlOf(Mockito.class, ByteBuddy.class, ObjenesisStd.class)
+ .withCodeSourceUrlOf(Mockito.class, ByteBuddy.class, ObjenesisStd.class, ClassVisitor.class)
.withCodeSourceUrlOf(coverageTool())
.build();
--- src/test/java/org/mockito/internal/junit/JUnitRuleTest.java.orig 2019-05-29 11:38:39.000000000 -0600
+++ src/test/java/org/mockito/internal/junit/JUnitRuleTest.java 2020-08-14 16:48:03.905053256 -0600
@@ -4,6 +4,7 @@
*/
package org.mockito.internal.junit;
--- src/test/java/org/mockito/internal/junit/JUnitRuleTest.java.orig 2020-08-22 14:11:33.000000000 -0600
+++ src/test/java/org/mockito/internal/junit/JUnitRuleTest.java 2020-08-23 11:55:09.645153413 -0600
@@ -8,6 +8,7 @@ import static org.junit.Assert.assertTru
import static org.mockito.Mockito.mockingDetails;
import static org.mockito.Mockito.when;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.mockito.Mock;
@@ -41,6 +42,7 @@ public class JUnitRuleTest {
@@ -42,6 +43,7 @@ public class JUnitRuleTest {
@SuppressWarnings({"CheckReturnValue", "MockitoUsage"})
@Test
+ @Ignore
public void does_not_check_invalid_mockito_usage_on_failure() throws Throwable {
//This intended behavior is questionable
//However, it was like that since the beginning of JUnit rule support
// This intended behavior is questionable
// However, it was like that since the beginning of JUnit rule support