commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chtom...@apache.org
Subject [03/14] [lang] added test case for more branch coverage
Date Fri, 17 Mar 2017 11:05:40 GMT
added test case for more branch coverage


Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/721a6e59
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/721a6e59
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/721a6e59

Branch: refs/heads/master
Commit: 721a6e59f7e4f5c0f3196d3eb0e81cab5e41d065
Parents: b5f5449
Author: MarkDacek <mark.dacek@richmond.edu>
Authored: Sun Mar 5 00:21:34 2017 -0500
Committer: MarkDacek <mark.dacek@richmond.edu>
Committed: Sun Mar 5 00:21:34 2017 -0500

----------------------------------------------------------------------
 .../java/org/apache/commons/lang3/CharSequenceUtilsTest.java | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/721a6e59/src/test/java/org/apache/commons/lang3/CharSequenceUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/CharSequenceUtilsTest.java b/src/test/java/org/apache/commons/lang3/CharSequenceUtilsTest.java
index a9acaf7..a5c0000 100644
--- a/src/test/java/org/apache/commons/lang3/CharSequenceUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/CharSequenceUtilsTest.java
@@ -195,6 +195,10 @@ public class CharSequenceUtilsTest {
     	StringBuilder builder = new StringBuilder();
     	builder.appendCodePoint(CODE_POINT);
     	assertEquals(0, CharSequenceUtils.lastIndexOf(builder, CODE_POINT, 0));
+    	char[] tmp = {(char) 55361};
+    	builder = new StringBuilder();
+    	builder.append(tmp);
+    	assertEquals(-1, CharSequenceUtils.lastIndexOf(builder, CODE_POINT, 0));
     }
     
     @Test
@@ -203,6 +207,10 @@ public class CharSequenceUtilsTest {
     	StringBuilder builder = new StringBuilder();
     	builder.appendCodePoint(CODE_POINT);
     	assertEquals(0, CharSequenceUtils.indexOf(builder, CODE_POINT, 0));
+    	char[] tmp = {(char) 55361};
+    	builder = new StringBuilder();
+    	builder.append(tmp);
+    	assertEquals(-1, CharSequenceUtils.indexOf(builder, CODE_POINT, 0));
     }
 
 }


Mime
View raw message