You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2020/05/19 20:50:37 UTC

[commons-codec] branch master updated: Move test fixtures to a component specific folder.

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-codec.git


The following commit(s) were added to refs/heads/master by this push:
     new 00c22c3  Move test fixtures to a component specific folder.
00c22c3 is described below

commit 00c22c317b085e68e6c29b54730a4238d6bef310
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue May 19 16:50:31 2020 -0400

    Move test fixtures to a component specific folder.
---
 pom.xml                                                     |  12 ++++++------
 .../org/apache/commons/codec/digest/DigestUtilsTest.java    |   6 +++---
 .../java/org/apache/commons/codec/digest/XXHash32Test.java  |   6 +++---
 src/test/resources/{ => org/apache/commons/codec}/bla.tar   | Bin
 .../resources/{ => org/apache/commons/codec}/bla.tar.xz     | Bin
 src/test/resources/{ => org/apache/commons/codec}/empty.bin |   0
 src/test/resources/{ => org/apache/commons/codec}/small.bin |   0
 7 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/pom.xml b/pom.xml
index e14eee0..abf68b3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -276,9 +276,9 @@ limitations under the License.
         <artifactId>apache-rat-plugin</artifactId>
         <configuration>
           <excludes>
-            <exclude>src/test/resources/bla.tar.xz</exclude>
-            <exclude>src/test/resources/empty.bin</exclude>
-            <exclude>src/test/resources/small.bin</exclude>
+            <exclude>src/test/resources/org/apache/commons/codec/bla.tar.xz</exclude>
+            <exclude>src/test/resources/org/apache/commons/codec/empty.bin</exclude>
+            <exclude>src/test/resources/org/apache/commons/codec/small.bin</exclude>
           </excludes>
         </configuration>
       </plugin>
@@ -345,9 +345,9 @@ limitations under the License.
         <artifactId>apache-rat-plugin</artifactId>
         <configuration>
           <excludes>
-            <exclude>src/test/resources/bla.tar.xz</exclude>
-            <exclude>src/test/resources/empty.bin</exclude>
-            <exclude>src/test/resources/small.bin</exclude>
+            <exclude>src/test/resources/org/apache/commons/codec/bla.tar.xz</exclude>
+            <exclude>src/test/resources/org/apache/commons/codec/empty.bin</exclude>
+            <exclude>src/test/resources/org/apache/commons/codec/small.bin</exclude>
           </excludes>
         </configuration>
       </plugin>
diff --git a/src/test/java/org/apache/commons/codec/digest/DigestUtilsTest.java b/src/test/java/org/apache/commons/codec/digest/DigestUtilsTest.java
index 7f82fb7..d33747f 100644
--- a/src/test/java/org/apache/commons/codec/digest/DigestUtilsTest.java
+++ b/src/test/java/org/apache/commons/codec/digest/DigestUtilsTest.java
@@ -116,7 +116,7 @@ public class DigestUtilsTest {
     @Test
     public void testDigestAs() throws IOException {
         final String expected = "d41d8cd98f00b204e9800998ecf8427e";
-        final String pathname = "src/test/resources/empty.bin";
+        final String pathname = "src/test/resources/org/apache/commons/codec/empty.bin";
         final String algo = MessageDigestAlgorithms.MD5;
         assertEquals(expected, new DigestUtils(algo).digestAsHex(new File(pathname)));
         try (final FileInputStream inputStream = new FileInputStream(pathname)) {
@@ -324,7 +324,7 @@ public class DigestUtilsTest {
     public void testSha224_FileAsHex() throws IOException {
         assumeJava8();
         final String expected = "d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f";
-        final String pathname = "src/test/resources/empty.bin";
+        final String pathname = "src/test/resources/org/apache/commons/codec/empty.bin";
         final String algo = MessageDigestAlgorithms.SHA_224;
         final DigestUtils digestUtils = new DigestUtils(algo);
         assertEquals(expected, digestUtils.digestAsHex(new File(pathname)));
@@ -340,7 +340,7 @@ public class DigestUtilsTest {
     public void testSha224_PathAsHex() throws IOException {
         assumeJava8();
         assertEquals("d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f",
-                new DigestUtils(MessageDigestAlgorithms.SHA_224).digestAsHex(Paths.get("src/test/resources/empty.bin")));
+                new DigestUtils(MessageDigestAlgorithms.SHA_224).digestAsHex(Paths.get("src/test/resources/org/apache/commons/codec/empty.bin")));
     }
 
     @Test
diff --git a/src/test/java/org/apache/commons/codec/digest/XXHash32Test.java b/src/test/java/org/apache/commons/codec/digest/XXHash32Test.java
index c3a5fbf..07babfd 100644
--- a/src/test/java/org/apache/commons/codec/digest/XXHash32Test.java
+++ b/src/test/java/org/apache/commons/codec/digest/XXHash32Test.java
@@ -62,9 +62,9 @@ public class XXHash32Test {
         return Arrays.asList(new Object[][] {
             // reference checksums created with xxh32sum
             // http://cyan4973.github.io/xxHash/
-            { "bla.tar", "fbb5c8d1" },
-            { "bla.tar.xz", "4106a208" },
-            { "small.bin", "f66c26f8" },
+            { "org/apache/commons/codec/bla.tar", "fbb5c8d1" },
+            { "org/apache/commons/codec/bla.tar.xz", "4106a208" },
+            { "org/apache/commons/codec/small.bin", "f66c26f8" },
         });
     }
 
diff --git a/src/test/resources/bla.tar b/src/test/resources/org/apache/commons/codec/bla.tar
similarity index 100%
rename from src/test/resources/bla.tar
rename to src/test/resources/org/apache/commons/codec/bla.tar
diff --git a/src/test/resources/bla.tar.xz b/src/test/resources/org/apache/commons/codec/bla.tar.xz
similarity index 100%
rename from src/test/resources/bla.tar.xz
rename to src/test/resources/org/apache/commons/codec/bla.tar.xz
diff --git a/src/test/resources/empty.bin b/src/test/resources/org/apache/commons/codec/empty.bin
similarity index 100%
rename from src/test/resources/empty.bin
rename to src/test/resources/org/apache/commons/codec/empty.bin
diff --git a/src/test/resources/small.bin b/src/test/resources/org/apache/commons/codec/small.bin
similarity index 100%
rename from src/test/resources/small.bin
rename to src/test/resources/org/apache/commons/codec/small.bin