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

Side by Side Diff: third_party/protobuf/java/core/src/test/java/com/google/protobuf/UnknownFieldSetLiteTest.java

Issue 2495533002: third_party/protobuf: Update to HEAD (83d681ee2c) (Closed)
Patch Set: Make chrome settings proto generated file a component Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Protocol Buffers - Google's data interchange format 1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc. All rights reserved. 2 // Copyright 2008 Google Inc. All rights reserved.
3 // https://developers.google.com/protocol-buffers/ 3 // https://developers.google.com/protocol-buffers/
4 // 4 //
5 // Redistribution and use in source and binary forms, with or without 5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are 6 // modification, are permitted provided that the following conditions are
7 // met: 7 // met:
8 // 8 //
9 // * Redistributions of source code must retain the above copyright 9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer. 10 // notice, this list of conditions and the following disclaimer.
(...skipping 17 matching lines...) Expand all
28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 30
31 package com.google.protobuf; 31 package com.google.protobuf;
32 32
33 import com.google.protobuf.UnittestLite.TestAllExtensionsLite; 33 import com.google.protobuf.UnittestLite.TestAllExtensionsLite;
34 import com.google.protobuf.UnittestLite.TestAllTypesLite; 34 import com.google.protobuf.UnittestLite.TestAllTypesLite;
35 import protobuf_unittest.lite_equals_and_hash.LiteEqualsAndHash; 35 import protobuf_unittest.lite_equals_and_hash.LiteEqualsAndHash;
36 import protobuf_unittest.lite_equals_and_hash.LiteEqualsAndHash.Bar; 36 import protobuf_unittest.lite_equals_and_hash.LiteEqualsAndHash.Bar;
37 import protobuf_unittest.lite_equals_and_hash.LiteEqualsAndHash.Foo; 37 import protobuf_unittest.lite_equals_and_hash.LiteEqualsAndHash.Foo;
38
39 import junit.framework.TestCase;
40
41 import java.io.ByteArrayOutputStream; 38 import java.io.ByteArrayOutputStream;
42 import java.io.IOException; 39 import java.io.IOException;
40 import junit.framework.TestCase;
43 41
44 /** 42 /**
45 * Tests for {@link UnknownFieldSetLite}. 43 * Tests for {@link UnknownFieldSetLite}.
46 * 44 *
47 * @author dweis@google.com (Daniel Weis) 45 * @author dweis@google.com (Daniel Weis)
48 */ 46 */
49 public class UnknownFieldSetLiteTest extends TestCase { 47 public class UnknownFieldSetLiteTest extends TestCase {
50 48
51 public void testDefaultInstance() { 49 public void testDefaultInstance() {
52 UnknownFieldSetLite unknownFields = UnknownFieldSetLite.getDefaultInstance() ; 50 UnknownFieldSetLite unknownFields = UnknownFieldSetLite.getDefaultInstance() ;
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 CodedOutputStream output = CodedOutputStream.newInstance(byteArrayOutputStre am); 317 CodedOutputStream output = CodedOutputStream.newInstance(byteArrayOutputStre am);
320 try { 318 try {
321 unknownFields.writeTo(output); 319 unknownFields.writeTo(output);
322 output.flush(); 320 output.flush();
323 } catch (IOException e) { 321 } catch (IOException e) {
324 throw new RuntimeException(e); 322 throw new RuntimeException(e);
325 } 323 }
326 return ByteString.copyFrom(byteArrayOutputStream.toByteArray()); 324 return ByteString.copyFrom(byteArrayOutputStream.toByteArray());
327 } 325 }
328 } 326 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698