diff options
Diffstat (limited to 'vespajlib/src/test/java/com/yahoo/text')
25 files changed, 29 insertions, 26 deletions
diff --git a/vespajlib/src/test/java/com/yahoo/text/Ascii7BitMatcherTestCase.java b/vespajlib/src/test/java/com/yahoo/text/Ascii7BitMatcherTestCase.java index c268ba2e1f7..4c1ef3232ff 100644 --- a/vespajlib/src/test/java/com/yahoo/text/Ascii7BitMatcherTestCase.java +++ b/vespajlib/src/test/java/com/yahoo/text/Ascii7BitMatcherTestCase.java @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.text; import org.junit.Assert; diff --git a/vespajlib/src/test/java/com/yahoo/text/AsciiTest.java b/vespajlib/src/test/java/com/yahoo/text/AsciiTest.java index fe6d17e7c08..727a818f5d1 100644 --- a/vespajlib/src/test/java/com/yahoo/text/AsciiTest.java +++ b/vespajlib/src/test/java/com/yahoo/text/AsciiTest.java @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.text; import org.junit.Test; diff --git a/vespajlib/src/test/java/com/yahoo/text/BooleanParserTestCase.java b/vespajlib/src/test/java/com/yahoo/text/BooleanParserTestCase.java index 50d41cb1910..cbdfe92132f 100644 --- a/vespajlib/src/test/java/com/yahoo/text/BooleanParserTestCase.java +++ b/vespajlib/src/test/java/com/yahoo/text/BooleanParserTestCase.java @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.text; import static org.junit.Assert.assertFalse; diff --git a/vespajlib/src/test/java/com/yahoo/text/CaseInsensitiveIdentifierTestCase.java b/vespajlib/src/test/java/com/yahoo/text/CaseInsensitiveIdentifierTestCase.java index b25d5fdda07..29f7f8827b9 100644 --- a/vespajlib/src/test/java/com/yahoo/text/CaseInsensitiveIdentifierTestCase.java +++ b/vespajlib/src/test/java/com/yahoo/text/CaseInsensitiveIdentifierTestCase.java @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.text; diff --git a/vespajlib/src/test/java/com/yahoo/text/DataTypeIdentifierTestCase.java b/vespajlib/src/test/java/com/yahoo/text/DataTypeIdentifierTestCase.java index 93f65a6acf9..f3342a601ae 100644 --- a/vespajlib/src/test/java/com/yahoo/text/DataTypeIdentifierTestCase.java +++ b/vespajlib/src/test/java/com/yahoo/text/DataTypeIdentifierTestCase.java @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.text; import org.junit.Test; diff --git a/vespajlib/src/test/java/com/yahoo/text/ExpressionFormatterTest.java b/vespajlib/src/test/java/com/yahoo/text/ExpressionFormatterTest.java index 1b7d0aea95a..54cff243e24 100644 --- a/vespajlib/src/test/java/com/yahoo/text/ExpressionFormatterTest.java +++ b/vespajlib/src/test/java/com/yahoo/text/ExpressionFormatterTest.java @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.text; import org.junit.Test; diff --git a/vespajlib/src/test/java/com/yahoo/text/ForwardWriterTestCase.java b/vespajlib/src/test/java/com/yahoo/text/ForwardWriterTestCase.java index 5de43f31959..28bca08ff48 100644 --- a/vespajlib/src/test/java/com/yahoo/text/ForwardWriterTestCase.java +++ b/vespajlib/src/test/java/com/yahoo/text/ForwardWriterTestCase.java @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.text; import static org.junit.Assert.assertEquals; diff --git a/vespajlib/src/test/java/com/yahoo/text/GenericWriterTestCase.java b/vespajlib/src/test/java/com/yahoo/text/GenericWriterTestCase.java index 2ef7824cc4b..a66f8a4ddb0 100644 --- a/vespajlib/src/test/java/com/yahoo/text/GenericWriterTestCase.java +++ b/vespajlib/src/test/java/com/yahoo/text/GenericWriterTestCase.java @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.text; import static org.junit.Assert.*; diff --git a/vespajlib/src/test/java/com/yahoo/text/HTMLTestCase.java b/vespajlib/src/test/java/com/yahoo/text/HTMLTestCase.java index 4d9a3f26c0b..4eb8c032887 100644 --- a/vespajlib/src/test/java/com/yahoo/text/HTMLTestCase.java +++ b/vespajlib/src/test/java/com/yahoo/text/HTMLTestCase.java @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.text; import org.junit.Test; diff --git a/vespajlib/src/test/java/com/yahoo/text/IdentifierTestCase.java b/vespajlib/src/test/java/com/yahoo/text/IdentifierTestCase.java index 3d56fd0bd40..90275a2b66e 100644 --- a/vespajlib/src/test/java/com/yahoo/text/IdentifierTestCase.java +++ b/vespajlib/src/test/java/com/yahoo/text/IdentifierTestCase.java @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.text; import org.junit.Test; diff --git a/vespajlib/src/test/java/com/yahoo/text/JSONTest.java b/vespajlib/src/test/java/com/yahoo/text/JSONTest.java index 68a0ae86587..d57c7e0c1a1 100644 --- a/vespajlib/src/test/java/com/yahoo/text/JSONTest.java +++ b/vespajlib/src/test/java/com/yahoo/text/JSONTest.java @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.text; import org.junit.Test; diff --git a/vespajlib/src/test/java/com/yahoo/text/JSONWriterTestCase.java b/vespajlib/src/test/java/com/yahoo/text/JSONWriterTestCase.java index 247eaf93b66..81268a4249e 100644 --- a/vespajlib/src/test/java/com/yahoo/text/JSONWriterTestCase.java +++ b/vespajlib/src/test/java/com/yahoo/text/JSONWriterTestCase.java @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.text; import org.junit.Test; diff --git a/vespajlib/src/test/java/com/yahoo/text/JsonMicroBenchmarkTestCase.java b/vespajlib/src/test/java/com/yahoo/text/JsonMicroBenchmarkTestCase.java index c37faf258ab..e2f9614aa16 100644 --- a/vespajlib/src/test/java/com/yahoo/text/JsonMicroBenchmarkTestCase.java +++ b/vespajlib/src/test/java/com/yahoo/text/JsonMicroBenchmarkTestCase.java @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.text; import static org.junit.Assert.*; diff --git a/vespajlib/src/test/java/com/yahoo/text/LowercaseIdentifierTestCase.java b/vespajlib/src/test/java/com/yahoo/text/LowercaseIdentifierTestCase.java index 0c24ec5e6f4..d823ffaa69e 100644 --- a/vespajlib/src/test/java/com/yahoo/text/LowercaseIdentifierTestCase.java +++ b/vespajlib/src/test/java/com/yahoo/text/LowercaseIdentifierTestCase.java @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.text; import org.junit.Test; diff --git a/vespajlib/src/test/java/com/yahoo/text/LowercaseTestCase.java b/vespajlib/src/test/java/com/yahoo/text/LowercaseTestCase.java index ca3b316c11b..a1bd793bd88 100644 --- a/vespajlib/src/test/java/com/yahoo/text/LowercaseTestCase.java +++ b/vespajlib/src/test/java/com/yahoo/text/LowercaseTestCase.java @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.text; import org.junit.Ignore; diff --git a/vespajlib/src/test/java/com/yahoo/text/MapParserMicroBenchmark.java b/vespajlib/src/test/java/com/yahoo/text/MapParserMicroBenchmark.java index 71c0e95c339..0b85f28ad40 100644 --- a/vespajlib/src/test/java/com/yahoo/text/MapParserMicroBenchmark.java +++ b/vespajlib/src/test/java/com/yahoo/text/MapParserMicroBenchmark.java @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.text; import java.util.HashMap; diff --git a/vespajlib/src/test/java/com/yahoo/text/MapParserTestCase.java b/vespajlib/src/test/java/com/yahoo/text/MapParserTestCase.java index 56205653a00..1793ad8cc61 100644 --- a/vespajlib/src/test/java/com/yahoo/text/MapParserTestCase.java +++ b/vespajlib/src/test/java/com/yahoo/text/MapParserTestCase.java @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.text; import org.junit.Test; diff --git a/vespajlib/src/test/java/com/yahoo/text/StringAppendMicroBenchmarkTest.java b/vespajlib/src/test/java/com/yahoo/text/StringAppendMicroBenchmarkTest.java index 0c9632f7458..13767c8034e 100644 --- a/vespajlib/src/test/java/com/yahoo/text/StringAppendMicroBenchmarkTest.java +++ b/vespajlib/src/test/java/com/yahoo/text/StringAppendMicroBenchmarkTest.java @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.text; import org.junit.Test; diff --git a/vespajlib/src/test/java/com/yahoo/text/StringUtilitiesTest.java b/vespajlib/src/test/java/com/yahoo/text/StringUtilitiesTest.java index b68cca6e54f..0be8978b78e 100644 --- a/vespajlib/src/test/java/com/yahoo/text/StringUtilitiesTest.java +++ b/vespajlib/src/test/java/com/yahoo/text/StringUtilitiesTest.java @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.text; import java.util.List; diff --git a/vespajlib/src/test/java/com/yahoo/text/TextTestCase.java b/vespajlib/src/test/java/com/yahoo/text/TextTestCase.java index c82eba0246f..9bb4668b7cb 100644 --- a/vespajlib/src/test/java/com/yahoo/text/TextTestCase.java +++ b/vespajlib/src/test/java/com/yahoo/text/TextTestCase.java @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.text; import org.junit.Ignore; @@ -104,6 +104,9 @@ public class TextTestCase { assertEquals("", Text.truncate("ab", 0)); assertEquals("ab c", Text.truncate("ab cde", 4)); assertEquals("a ...", Text.truncate("ab cde", 5)); + assertEquals("abc ...", Text.truncate("abc\uD83D\uDE48\uD83D\uDE49\uD83D\uDE4Adef", 7)); + assertEquals("abc\uD83D\uDE48 ...", Text.truncate("abc\uD83D\uDE48\uD83D\uDE49\uD83D\uDE4Adef", 8)); + assertEquals("abc\uD83D\uDE48\uD83D\uDE49\uD83D\uDE4Adef", Text.truncate("abc\uD83D\uDE48\uD83D\uDE49\uD83D\uDE4Adef", 9)); } @Test @@ -152,6 +155,6 @@ public class TextTestCase { sum = benchmarkIsValid(strings, 100000000); diff = System.nanoTime() - start; System.out.println("Validation num isValid = " + sum + ". Took " + diff + "ns"); - } + } diff --git a/vespajlib/src/test/java/com/yahoo/text/Utf8ArrayTestCase.java b/vespajlib/src/test/java/com/yahoo/text/Utf8ArrayTestCase.java index 4b16695bf9f..c7391b93168 100644 --- a/vespajlib/src/test/java/com/yahoo/text/Utf8ArrayTestCase.java +++ b/vespajlib/src/test/java/com/yahoo/text/Utf8ArrayTestCase.java @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.text; import static org.junit.Assert.*; diff --git a/vespajlib/src/test/java/com/yahoo/text/Utf8TestCase.java b/vespajlib/src/test/java/com/yahoo/text/Utf8TestCase.java index 098eaddacac..bf1a20fe497 100644 --- a/vespajlib/src/test/java/com/yahoo/text/Utf8TestCase.java +++ b/vespajlib/src/test/java/com/yahoo/text/Utf8TestCase.java @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.text; import org.junit.Ignore; diff --git a/vespajlib/src/test/java/com/yahoo/text/XMLTestCase.java b/vespajlib/src/test/java/com/yahoo/text/XMLTestCase.java index a54827d4d13..1565d067a09 100644 --- a/vespajlib/src/test/java/com/yahoo/text/XMLTestCase.java +++ b/vespajlib/src/test/java/com/yahoo/text/XMLTestCase.java @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.text; import org.junit.Test; diff --git a/vespajlib/src/test/java/com/yahoo/text/XMLWriterTestCase.java b/vespajlib/src/test/java/com/yahoo/text/XMLWriterTestCase.java index 6235969ca69..e77a052d17b 100644 --- a/vespajlib/src/test/java/com/yahoo/text/XMLWriterTestCase.java +++ b/vespajlib/src/test/java/com/yahoo/text/XMLWriterTestCase.java @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.text; import org.junit.After; diff --git a/vespajlib/src/test/java/com/yahoo/text/internal/SnippetGeneratorTest.java b/vespajlib/src/test/java/com/yahoo/text/internal/SnippetGeneratorTest.java index 54c5a37f23c..ac9bb9eb3c0 100644 --- a/vespajlib/src/test/java/com/yahoo/text/internal/SnippetGeneratorTest.java +++ b/vespajlib/src/test/java/com/yahoo/text/internal/SnippetGeneratorTest.java @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.text.internal; import org.junit.Test; |