aboutsummaryrefslogtreecommitdiffstats
path: root/vespajlib/src/test
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-09-18 17:10:02 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2023-09-18 17:10:02 +0200
commit7dd967768e90abfbcced81148cd3bb9d17bc8b23 (patch)
tree9d6c13062018078c06c1e9fd00aa6f9f0e847ea2 /vespajlib/src/test
parenteede788d1c20d2f246f44287308dad69487369ea (diff)
Handle the exception that will come when codepoints < 'from' < len.
Already done and tested for 'to'.
Diffstat (limited to 'vespajlib/src/test')
-rw-r--r--vespajlib/src/test/java/com/yahoo/text/TextTestCase.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/vespajlib/src/test/java/com/yahoo/text/TextTestCase.java b/vespajlib/src/test/java/com/yahoo/text/TextTestCase.java
index 2639882230f..c82eba0246f 100644
--- a/vespajlib/src/test/java/com/yahoo/text/TextTestCase.java
+++ b/vespajlib/src/test/java/com/yahoo/text/TextTestCase.java
@@ -73,6 +73,7 @@ public class TextTestCase {
String withSurrogates = fromCP("abc", new int[]{0x10F000, 0x10F001, 0x10F002}, "def");
assertEquals(withSurrogates, Text.substringByCodepoints(withSurrogates, 0, 11));
assertEquals(withSurrogates, Text.substringByCodepoints(withSurrogates, 0, 20));
+ assertEquals("", Text.substringByCodepoints(withSurrogates, 10, 11));
assertEquals(fromCP("bc", new int[]{0x10F000, 0x10F001}, ""),
Text.substringByCodepoints(withSurrogates, 1, 5));
assertEquals(fromCP("", new int[]{0x10F001}, ""),