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 2023/11/03 14:23:45 UTC
(commons-imaging) branch master updated (25435ab6 -> f630d0bb)
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-imaging.git
from 25435ab6 Fix spelling
new cdc30f70 Normalize test method names
new f630d0bb Sort test members
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../imaging/formats/jpeg/iptc/IptcFullDiscardTest.java | 16 ++++++++--------
.../commons/imaging/formats/png/PhysicalScaleTest.java | 4 ++--
2 files changed, 10 insertions(+), 10 deletions(-)
(commons-imaging) 02/02: Sort test members
Posted by gg...@apache.org.
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-imaging.git
commit f630d0bb5334036d488915c871080fd205b1898e
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Nov 3 10:23:41 2023 -0400
Sort test members
---
.../imaging/formats/jpeg/iptc/IptcFullDiscardTest.java | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcFullDiscardTest.java b/src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcFullDiscardTest.java
index 185a8164..36cb24f6 100644
--- a/src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcFullDiscardTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcFullDiscardTest.java
@@ -47,6 +47,12 @@ public class IptcFullDiscardTest {
return byteArrayOutputStream.toByteArray();
}
+ private byte[] removeMetaData(final byte[] bytes, final boolean removeApp13Segment) throws Exception {
+ final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
+ new JpegIptcRewriter().removeIptc(bytes, byteArrayOutputStream, removeApp13Segment);
+ return byteArrayOutputStream.toByteArray();
+ }
+
@Test
public void testLeaveApp13Segment() throws Exception {
final byte[] originalImage = generateImage();
@@ -62,10 +68,4 @@ public class IptcFullDiscardTest {
final byte[] untaggedImage = removeMetaData(taggedImage, true);
assertEquals(originalImage.length, untaggedImage.length);
}
-
- private byte[] removeMetaData(final byte[] bytes, final boolean removeApp13Segment) throws Exception {
- final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
- new JpegIptcRewriter().removeIptc(bytes, byteArrayOutputStream, removeApp13Segment);
- return byteArrayOutputStream.toByteArray();
- }
}
(commons-imaging) 01/02: Normalize test method names
Posted by gg...@apache.org.
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-imaging.git
commit cdc30f70be6f232f8b20bc65733f5a23a4ca426c
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Nov 3 10:23:31 2023 -0400
Normalize test method names
---
.../apache/commons/imaging/formats/jpeg/iptc/IptcFullDiscardTest.java | 4 ++--
.../org/apache/commons/imaging/formats/png/PhysicalScaleTest.java | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcFullDiscardTest.java b/src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcFullDiscardTest.java
index 36e3ba55..185a8164 100644
--- a/src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcFullDiscardTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcFullDiscardTest.java
@@ -48,7 +48,7 @@ public class IptcFullDiscardTest {
}
@Test
- public void leaveApp13Segment() throws Exception {
+ public void testLeaveApp13Segment() throws Exception {
final byte[] originalImage = generateImage();
final byte[] taggedImage = addMetaData(originalImage);
final byte[] untaggedImage = removeMetaData(taggedImage, false);
@@ -56,7 +56,7 @@ public class IptcFullDiscardTest {
}
@Test
- public void removeApp13Segment() throws Exception {
+ public void testRemoveApp13Segment() throws Exception {
final byte[] originalImage = generateImage();
final byte[] taggedImage = addMetaData(originalImage);
final byte[] untaggedImage = removeMetaData(taggedImage, true);
diff --git a/src/test/java/org/apache/commons/imaging/formats/png/PhysicalScaleTest.java b/src/test/java/org/apache/commons/imaging/formats/png/PhysicalScaleTest.java
index 69afbc38..e623c340 100644
--- a/src/test/java/org/apache/commons/imaging/formats/png/PhysicalScaleTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/png/PhysicalScaleTest.java
@@ -26,7 +26,7 @@ public class PhysicalScaleTest {
private static final double delta = 0.01;
@Test
- public void createFromMeters() {
+ public void testCreateFromMeters() {
final PhysicalScale physicalScale = PhysicalScale.createFromMeters(1.0, 2.0);
assertTrue(physicalScale.isInMeters());
@@ -36,7 +36,7 @@ public class PhysicalScaleTest {
}
@Test
- public void createFromRadians() {
+ public void testCreateFromRadians() {
final PhysicalScale physicalScale = PhysicalScale.createFromRadians(2.0, 1.0);
assertFalse(physicalScale.isInMeters());