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

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

Issue 2590803003: Revert "third_party/protobuf: Update to HEAD (83d681ee2c)" (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: third_party/protobuf/java/core/src/test/java/com/google/protobuf/DescriptorsTest.java
diff --git a/third_party/protobuf/java/core/src/test/java/com/google/protobuf/DescriptorsTest.java b/third_party/protobuf/java/core/src/test/java/com/google/protobuf/DescriptorsTest.java
index b60cd6208859d0cd70d4c216b98f4b9e5f502c28..ef89b389c26ebaf0b7858c8f3a76bc3ee2ba9cf3 100644
--- a/third_party/protobuf/java/core/src/test/java/com/google/protobuf/DescriptorsTest.java
+++ b/third_party/protobuf/java/core/src/test/java/com/google/protobuf/DescriptorsTest.java
@@ -55,15 +55,15 @@ import protobuf_unittest.UnittestProto.ForeignMessage;
import protobuf_unittest.UnittestProto.TestAllExtensions;
import protobuf_unittest.UnittestProto.TestAllTypes;
import protobuf_unittest.UnittestProto.TestExtremeDefaultValues;
-import protobuf_unittest.UnittestProto.TestJsonName;
import protobuf_unittest.UnittestProto.TestMultipleExtensionRanges;
import protobuf_unittest.UnittestProto.TestRequired;
import protobuf_unittest.UnittestProto.TestReservedFields;
import protobuf_unittest.UnittestProto.TestService;
+import junit.framework.TestCase;
+
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
-import junit.framework.TestCase;
/**
* Unit test for {@link Descriptors}.
@@ -382,14 +382,6 @@ public class DescriptorsTest extends TestCase {
assertEquals(Long.valueOf(8765432109L),
field.getOptions().getExtension(UnittestCustomOptions.fieldOpt1));
- OneofDescriptor oneof = descriptor.getOneofs().get(0);
- assertNotNull(oneof);
-
- assertTrue(
- oneof.getOptions().hasExtension(UnittestCustomOptions.oneofOpt1));
- assertEquals(Integer.valueOf(-99),
- oneof.getOptions().getExtension(UnittestCustomOptions.oneofOpt1));
-
EnumDescriptor enumType =
UnittestCustomOptions.TestMessageWithCustomOptions.AnEnum.getDescriptor();
@@ -805,15 +797,4 @@ public class DescriptorsTest extends TestCase {
Descriptors.FileDescriptor.buildFrom(
fileDescriptorProto, new FileDescriptor[0]);
}
-
- public void testFieldJsonName() throws Exception {
- Descriptor d = TestJsonName.getDescriptor();
- assertEquals(6, d.getFields().size());
- assertEquals("fieldName1", d.getFields().get(0).getJsonName());
- assertEquals("fieldName2", d.getFields().get(1).getJsonName());
- assertEquals("FieldName3", d.getFields().get(2).getJsonName());
- assertEquals("FieldName4", d.getFields().get(3).getJsonName());
- assertEquals("FIELDNAME5", d.getFields().get(4).getJsonName());
- assertEquals("@type", d.getFields().get(5).getJsonName());
- }
}

Powered by Google App Engine
This is Rietveld 408576698