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

Side by Side Diff: third_party/protobuf/java/core/src/test/java/com/google/protobuf/UnknownFieldSetTest.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 20 matching lines...) Expand all
31 package com.google.protobuf; 31 package com.google.protobuf;
32 32
33 import protobuf_unittest.UnittestProto; 33 import protobuf_unittest.UnittestProto;
34 import protobuf_unittest.UnittestProto.ForeignEnum; 34 import protobuf_unittest.UnittestProto.ForeignEnum;
35 import protobuf_unittest.UnittestProto.TestAllExtensions; 35 import protobuf_unittest.UnittestProto.TestAllExtensions;
36 import protobuf_unittest.UnittestProto.TestAllTypes; 36 import protobuf_unittest.UnittestProto.TestAllTypes;
37 import protobuf_unittest.UnittestProto.TestEmptyMessage; 37 import protobuf_unittest.UnittestProto.TestEmptyMessage;
38 import protobuf_unittest.UnittestProto.TestEmptyMessageWithExtensions; 38 import protobuf_unittest.UnittestProto.TestEmptyMessageWithExtensions;
39 import protobuf_unittest.UnittestProto.TestPackedExtensions; 39 import protobuf_unittest.UnittestProto.TestPackedExtensions;
40 import protobuf_unittest.UnittestProto.TestPackedTypes; 40 import protobuf_unittest.UnittestProto.TestPackedTypes;
41
42 import junit.framework.TestCase;
43
44 import java.util.Arrays; 41 import java.util.Arrays;
45 import java.util.Map; 42 import java.util.Map;
43 import junit.framework.TestCase;
46 44
47 /** 45 /**
48 * Tests related to unknown field handling. 46 * Tests related to unknown field handling.
49 * 47 *
50 * @author kenton@google.com (Kenton Varda) 48 * @author kenton@google.com (Kenton Varda)
51 */ 49 */
52 public class UnknownFieldSetTest extends TestCase { 50 public class UnknownFieldSetTest extends TestCase {
53 @Override 51 @Override
54 public void setUp() throws Exception { 52 public void setUp() throws Exception {
55 descriptor = TestAllTypes.getDescriptor(); 53 descriptor = TestAllTypes.getDescriptor();
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 UnittestLite.TestEmptyMessageLite.parseFrom(allFieldsData); 643 UnittestLite.TestEmptyMessageLite.parseFrom(allFieldsData);
646 UnittestLite.TestEmptyMessageLite emptyMessageLite2 = 644 UnittestLite.TestEmptyMessageLite emptyMessageLite2 =
647 UnittestLite.TestEmptyMessageLite.newBuilder() 645 UnittestLite.TestEmptyMessageLite.newBuilder()
648 .mergeFrom(emptyMessageLite1).clear().build(); 646 .mergeFrom(emptyMessageLite1).clear().build();
649 assertEquals(0, emptyMessageLite2.getSerializedSize()); 647 assertEquals(0, emptyMessageLite2.getSerializedSize());
650 ByteString data = emptyMessageLite2.toByteString(); 648 ByteString data = emptyMessageLite2.toByteString();
651 assertEquals(0, data.size()); 649 assertEquals(0, data.size());
652 } 650 }
653 651
654 } 652 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698