From 0db179c65ddfc45379b0cbc6f0782ef538d1b76f Mon Sep 17 00:00:00 2001 From: Ilpo Ruotsalainen Date: Thu, 29 Nov 2018 14:49:35 +0100 Subject: Remove unwanted dependencies and use JUnit5. --- abi-check-plugin/pom.xml | 32 +++++++++++++++------- .../com/yahoo/abicheck/AccessConversionTest.java | 10 ++++--- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/abi-check-plugin/pom.xml b/abi-check-plugin/pom.xml index e8575fd8a59..ead5d5f24d3 100644 --- a/abi-check-plugin/pom.xml +++ b/abi-check-plugin/pom.xml @@ -23,31 +23,43 @@ maven-plugin-api 3.5.0 + + org.apache.maven + maven-core + 3.5.0 + org.apache.maven.plugin-tools maven-plugin-annotations provided - - org.apache.maven.reporting - maven-reporting-impl - 3.0.0 - - - org.apache.maven.reporting - maven-reporting-api - 3.0 - org.ow2.asm asm 7.0 + + com.google.guava + guava + 24.0-jre + com.google.code.gson gson 2.8.5 + + org.junit.jupiter + junit-jupiter-api + 5.3.1 + test + + + org.hamcrest + hamcrest-all + 1.3 + test + ${project.artifactId} diff --git a/abi-check-plugin/src/test/java/com/yahoo/abicheck/AccessConversionTest.java b/abi-check-plugin/src/test/java/com/yahoo/abicheck/AccessConversionTest.java index f64d9c3b8fc..eaa49789f2f 100644 --- a/abi-check-plugin/src/test/java/com/yahoo/abicheck/AccessConversionTest.java +++ b/abi-check-plugin/src/test/java/com/yahoo/abicheck/AccessConversionTest.java @@ -1,10 +1,11 @@ package com.yahoo.abicheck; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; import com.yahoo.abicheck.collector.Util; import java.util.Arrays; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.objectweb.asm.Opcodes; public class AccessConversionTest { @@ -38,9 +39,10 @@ public class AccessConversionTest { Util.fieldFlags)); } - @Test(expected = IllegalArgumentException.class) + @Test public void testUnsupportedFlags() { // ACC_MODULE is not a valid flag for fields - Util.convertAccess(Opcodes.ACC_MODULE, Util.fieldFlags); + assertThrows(IllegalArgumentException.class, + () -> Util.convertAccess(Opcodes.ACC_MODULE, Util.fieldFlags)); } } -- cgit v1.2.3