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

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

Issue 2590803003: Revert "third_party/protobuf: Update to HEAD (83d681ee2c)" (Closed)
Patch Set: Created 3 years, 12 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 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 19 matching lines...) Expand all
30 30
31 package com.google.protobuf; 31 package com.google.protobuf;
32 32
33 import com.google.protobuf.Descriptors.EnumDescriptor; 33 import com.google.protobuf.Descriptors.EnumDescriptor;
34 import com.google.protobuf.Descriptors.FieldDescriptor; 34 import com.google.protobuf.Descriptors.FieldDescriptor;
35 import com.google.protobuf.Descriptors.OneofDescriptor; 35 import com.google.protobuf.Descriptors.OneofDescriptor;
36 import protobuf_unittest.UnittestProto.TestAllExtensions; 36 import protobuf_unittest.UnittestProto.TestAllExtensions;
37 import protobuf_unittest.UnittestProto.TestAllTypes; 37 import protobuf_unittest.UnittestProto.TestAllTypes;
38 import protobuf_unittest.UnittestProto.TestEmptyMessage; 38 import protobuf_unittest.UnittestProto.TestEmptyMessage;
39 import protobuf_unittest.UnittestProto.TestPackedTypes; 39 import protobuf_unittest.UnittestProto.TestPackedTypes;
40
41 import junit.framework.TestCase;
42
40 import java.util.Arrays; 43 import java.util.Arrays;
41 import junit.framework.TestCase;
42 44
43 /** 45 /**
44 * Unit test for {@link DynamicMessage}. See also {@link MessageTest}, which 46 * Unit test for {@link DynamicMessage}. See also {@link MessageTest}, which
45 * tests some {@link DynamicMessage} functionality. 47 * tests some {@link DynamicMessage} functionality.
46 * 48 *
47 * @author kenton@google.com Kenton Varda 49 * @author kenton@google.com Kenton Varda
48 */ 50 */
49 public class DynamicMessageTest extends TestCase { 51 public class DynamicMessageTest extends TestCase {
50 TestUtil.ReflectionTester reflectionTester = 52 TestUtil.ReflectionTester reflectionTester =
51 new TestUtil.ReflectionTester(TestAllTypes.getDescriptor(), null); 53 new TestUtil.ReflectionTester(TestAllTypes.getDescriptor(), null);
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 FieldDescriptor repeatedEnumField = 317 FieldDescriptor repeatedEnumField =
316 TestAllTypes.getDescriptor().findFieldByName( 318 TestAllTypes.getDescriptor().findFieldByName(
317 "repeated_nested_enum"); 319 "repeated_nested_enum");
318 EnumDescriptor enumDescriptor = TestAllTypes.NestedEnum.getDescriptor(); 320 EnumDescriptor enumDescriptor = TestAllTypes.NestedEnum.getDescriptor();
319 builder.setField(repeatedEnumField, enumDescriptor.getValues()); 321 builder.setField(repeatedEnumField, enumDescriptor.getValues());
320 DynamicMessage message = builder.build(); 322 DynamicMessage message = builder.build();
321 assertEquals( 323 assertEquals(
322 enumDescriptor.getValues(), message.getField(repeatedEnumField)); 324 enumDescriptor.getValues(), message.getField(repeatedEnumField));
323 } 325 }
324 } 326 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698