Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Unified Diff: third_party/protobuf/java/core/src/test/java/com/google/protobuf/BoundedByteStringTest.java

Issue 1983203003: Update third_party/protobuf to protobuf-v3.0.0-beta-3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: owners Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/protobuf/java/core/src/test/java/com/google/protobuf/BoundedByteStringTest.java
diff --git a/third_party/protobuf/java/src/test/java/com/google/protobuf/BoundedByteStringTest.java b/third_party/protobuf/java/core/src/test/java/com/google/protobuf/BoundedByteStringTest.java
similarity index 95%
rename from third_party/protobuf/java/src/test/java/com/google/protobuf/BoundedByteStringTest.java
rename to third_party/protobuf/java/core/src/test/java/com/google/protobuf/BoundedByteStringTest.java
index 2dfae2e6f071f4b8f8bdbde2730511a8685d8b6b..db10ee748304ddd3a98cac9f33e6d5db726b2a98 100644
--- a/third_party/protobuf/java/src/test/java/com/google/protobuf/BoundedByteStringTest.java
+++ b/third_party/protobuf/java/core/src/test/java/com/google/protobuf/BoundedByteStringTest.java
@@ -37,7 +37,6 @@ import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.UnsupportedEncodingException;
-
/**
* This class tests {@link BoundedByteString}, which extends {@link LiteralByteString},
* by inheriting the tests from {@link LiteralByteStringTest}. The only method which
@@ -62,7 +61,7 @@ public class BoundedByteStringTest extends LiteralByteStringTest {
@Override
public void testToString() throws UnsupportedEncodingException {
String testString = "I love unicode \u1234\u5678 characters";
- LiteralByteString unicode = new LiteralByteString(testString.getBytes(Internal.UTF_8));
+ ByteString unicode = ByteString.wrap(testString.getBytes(Internal.UTF_8));
ByteString chopped = unicode.substring(2, unicode.size() - 6);
assertEquals(classUnderTest + ".substring() must have the expected type",
classUnderTest, getActualClassName(chopped));
@@ -75,7 +74,7 @@ public class BoundedByteStringTest extends LiteralByteStringTest {
@Override
public void testCharsetToString() {
String testString = "I love unicode \u1234\u5678 characters";
- LiteralByteString unicode = new LiteralByteString(testString.getBytes(Internal.UTF_8));
+ ByteString unicode = ByteString.wrap(testString.getBytes(Internal.UTF_8));
ByteString chopped = unicode.substring(2, unicode.size() - 6);
assertEquals(classUnderTest + ".substring() must have the expected type",
classUnderTest, getActualClassName(chopped));

Powered by Google App Engine
This is Rietveld 408576698