aboutsummaryrefslogtreecommitdiff
path: root/java/src/test/java/com/google/protobuf/ByteStringTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/test/java/com/google/protobuf/ByteStringTest.java')
-rw-r--r--java/src/test/java/com/google/protobuf/ByteStringTest.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/java/src/test/java/com/google/protobuf/ByteStringTest.java b/java/src/test/java/com/google/protobuf/ByteStringTest.java
index 15de17cd..8d026190 100644
--- a/java/src/test/java/com/google/protobuf/ByteStringTest.java
+++ b/java/src/test/java/com/google/protobuf/ByteStringTest.java
@@ -380,7 +380,7 @@ public class ByteStringTest extends TestCase {
return -1;
}
}
-
+
// A stream which exposes the byte array passed into write(byte[], int, int).
private static class EvilOutputStream extends OutputStream {
public byte[] capturedArray = null;
@@ -492,13 +492,13 @@ public class ByteStringTest extends TestCase {
isArrayRange(bytes, byteString.toByteArray(), 0, bytes.length));
}
}
-
+
public void testNewOutputEmpty() throws IOException {
// Make sure newOutput() correctly builds empty byte strings
ByteString byteString = ByteString.newOutput().toByteString();
assertEquals(ByteString.EMPTY, byteString);
}
-
+
public void testNewOutput_Mutating() throws IOException {
Output os = ByteString.newOutput(5);
os.write(new byte[] {1, 2, 3, 4, 5});
@@ -705,14 +705,14 @@ public class ByteStringTest extends TestCase {
}
return pieces;
}
-
+
private byte[] substringUsingWriteTo(
ByteString data, int offset, int length) throws IOException {
ByteArrayOutputStream output = new ByteArrayOutputStream();
data.writeTo(output, offset, length);
return output.toByteArray();
}
-
+
public void testWriteToOutputStream() throws Exception {
// Choose a size large enough so when two ByteStrings are concatenated they
// won't be merged into one byte array due to some optimizations.
@@ -727,7 +727,7 @@ public class ByteStringTest extends TestCase {
byte[] result = substringUsingWriteTo(left, 1, 1);
assertEquals(1, result.length);
assertEquals((byte) 11, result[0]);
-
+
byte[] data2 = new byte[dataSize];
for (int i = 0; i < data1.length; i++) {
data2[i] = (byte) 2;