You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ch...@apache.org on 2017/06/12 12:01:57 UTC

[1/3] [text] Improved test coverage for StrTokenizer class

Repository: commons-text
Updated Branches:
  refs/heads/master bfbf2c756 -> 125b93bf5


Improved test coverage for StrTokenizer class


Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/65f5889f
Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/65f5889f
Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/65f5889f

Branch: refs/heads/master
Commit: 65f5889f501f784264606f0e087fe8afb653c40d
Parents: 5f498c0
Author: Arun Vinud <ar...@capitalone.com>
Authored: Sun Jun 11 12:43:43 2017 -0400
Committer: Arun Vinud <ar...@capitalone.com>
Committed: Sun Jun 11 12:43:43 2017 -0400

----------------------------------------------------------------------
 .../apache/commons/text/StrTokenizerTest.java   | 29 ++++++++++++++++++--
 1 file changed, 27 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-text/blob/65f5889f/src/test/java/org/apache/commons/text/StrTokenizerTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/text/StrTokenizerTest.java b/src/test/java/org/apache/commons/text/StrTokenizerTest.java
index 7e86084..8f870d1 100644
--- a/src/test/java/org/apache/commons/text/StrTokenizerTest.java
+++ b/src/test/java/org/apache/commons/text/StrTokenizerTest.java
@@ -19,13 +19,13 @@ package org.apache.commons.text;
 
 import org.junit.Test;
 
-import static org.junit.Assert.*;
-
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 import java.util.NoSuchElementException;
 
+import static org.junit.Assert.*;
+
 /**
  * Unit test for {@link StrTokenizer}.
  */
@@ -910,4 +910,29 @@ public class StrTokenizerTest {
         assertEquals("StrTokenizer[a, b, c, d, e]", tkn.toString());
     }
 
+    //-----------------------------------------------------------------------
+    @Test
+    public void testStringTokenizerStringMatcher() {
+        char chars[]=new char[]{'a', 'b', 'c', 'd'};
+        final StrTokenizer tokens= new StrTokenizer(chars, "bc");
+        assertEquals("a", tokens.next());
+        assertEquals("d", tokens.next());
+    }
+
+    //-----------------------------------------------------------------------
+    @Test
+    public void testStringTokenizerStrMatcher() {
+        char chars[]=new char[]{'a', ',', 'c'};
+        final StrTokenizer tokens= new StrTokenizer(chars, StrMatcher.commaMatcher());
+        assertEquals("a", tokens.next());
+        assertEquals("c", tokens.next());
+    }
+
+    //-----------------------------------------------------------------------
+    @Test
+    public void testStringTokenizerQuoteMatcher() {
+        char chars[]=new char[]{'\'','a', 'c','\'','d'};
+        final StrTokenizer tokens= new StrTokenizer(chars, StrMatcher.commaMatcher(), StrMatcher.quoteMatcher());
+        assertEquals("acd", tokens.next());
+    }
 }


[3/3] [text] Arun get's credit for contributing

Posted by ch...@apache.org.
Arun get's credit for contributing


Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/125b93bf
Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/125b93bf
Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/125b93bf

Branch: refs/heads/master
Commit: 125b93bf562ef4c254bdeb3bfab477ff12b85055
Parents: 597a8ad
Author: Rob Tompkins <ch...@apache.org>
Authored: Mon Jun 12 08:01:54 2017 -0400
Committer: Rob Tompkins <ch...@apache.org>
Committed: Mon Jun 12 08:01:54 2017 -0400

----------------------------------------------------------------------
 pom.xml | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-text/blob/125b93bf/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index b4d2c82..809d105 100644
--- a/pom.xml
+++ b/pom.xml
@@ -92,6 +92,9 @@
     <contributor>
       <name>Amey Jadiye</name>
     </contributor>
+    <contributor>
+      <name>Arun Vinud S S</name>
+    </contributor>
   </contributors>
 
   <dependencies>


[2/3] [text] Merge branch 'improveTestCoverage' of https://github.com/arunvinudss/commons-text

Posted by ch...@apache.org.
Merge branch 'improveTestCoverage' of https://github.com/arunvinudss/commons-text


Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/597a8adc
Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/597a8adc
Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/597a8adc

Branch: refs/heads/master
Commit: 597a8adcb69045a680884a8b9f99cae7b71efc86
Parents: bfbf2c7 65f5889
Author: Rob Tompkins <ch...@apache.org>
Authored: Mon Jun 12 08:00:47 2017 -0400
Committer: Rob Tompkins <ch...@apache.org>
Committed: Mon Jun 12 08:00:47 2017 -0400

----------------------------------------------------------------------
 .../apache/commons/text/StrTokenizerTest.java   | 29 ++++++++++++++++++--
 1 file changed, 27 insertions(+), 2 deletions(-)
----------------------------------------------------------------------