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 2022/07/28 13:11:26 UTC

[commons-io] branch master updated: Add tests

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-io.git


The following commit(s) were added to refs/heads/master by this push:
     new 5e552a1e Add tests
5e552a1e is described below

commit 5e552a1e631bee1c60b6925ecc453b70f6ad29da
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 28 09:11:19 2022 -0400

    Add tests
---
 src/test/java/org/apache/commons/io/function/IOPredicateTest.java | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/test/java/org/apache/commons/io/function/IOPredicateTest.java b/src/test/java/org/apache/commons/io/function/IOPredicateTest.java
index 7f2d29ba..9d52a13b 100644
--- a/src/test/java/org/apache/commons/io/function/IOPredicateTest.java
+++ b/src/test/java/org/apache/commons/io/function/IOPredicateTest.java
@@ -19,6 +19,8 @@ package org.apache.commons.io.function;
 
 import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertSame;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.IOException;
@@ -93,6 +95,8 @@ public class IOPredicateTest {
         // Make sure we keep the argument type
         final IOPredicate<String> alwaysFalse = IOPredicate.alwaysFalse();
         assertFalse(alwaysFalse.test("A"));
+        assertEquals(IOPredicate.alwaysFalse(), IOPredicate.alwaysFalse());
+        assertSame(IOPredicate.alwaysFalse(), IOPredicate.alwaysFalse());
     }
 
     @Test
@@ -157,6 +161,8 @@ public class IOPredicateTest {
         // Make sure we keep the argument type
         final IOPredicate<String> alwaysTrue = IOPredicate.alwaysTrue();
         assertTrue(alwaysTrue.test("A"));
+        assertEquals(IOPredicate.alwaysTrue(), IOPredicate.alwaysTrue());
+        assertSame(IOPredicate.alwaysTrue(), IOPredicate.alwaysTrue());
     }
 
 }