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/src/test/java/com/google/protobuf/TestBadIdentifiers.java

Issue 11347026: Check in protobuf java code and generate lite jar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved target to android conditional Created 8 years, 1 month 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/src/test/java/com/google/protobuf/TestBadIdentifiers.java
diff --git a/third_party/protobuf/python/google/protobuf/internal/more_extensions.proto b/third_party/protobuf/java/src/test/java/com/google/protobuf/TestBadIdentifiers.java
similarity index 74%
copy from third_party/protobuf/python/google/protobuf/internal/more_extensions.proto
copy to third_party/protobuf/java/src/test/java/com/google/protobuf/TestBadIdentifiers.java
index e2d97010450d32f2d1dd7b3ec0d2d05bf93435cb..6feec4e6898f0cd869c24e932365eac101a2ee67 100644
--- a/third_party/protobuf/python/google/protobuf/internal/more_extensions.proto
+++ b/third_party/protobuf/java/src/test/java/com/google/protobuf/TestBadIdentifiers.java
@@ -28,31 +28,22 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Author: robinson@google.com (Will Robinson)
-
-
-package google.protobuf.internal;
-
-
-message TopLevelMessage {
- optional ExtendedMessage submessage = 1;
-}
-
-
-message ExtendedMessage {
- extensions 1 to max;
-}
-
-
-message ForeignMessage {
- optional int32 foreign_message_int = 1;
-}
-
-
-extend ExtendedMessage {
- optional int32 optional_int_extension = 1;
- optional ForeignMessage optional_message_extension = 2;
-
- repeated int32 repeated_int_extension = 3;
- repeated ForeignMessage repeated_message_extension = 4;
+package com.google.protobuf;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests that proto2 api generation doesn't cause compile errors when
+ * compiling protocol buffers that have names that would otherwise conflict
+ * if not fully qualified (like @Deprecated and @Override).
+ *
+ * @author jonp@google.com (Jon Perlow)
+ */
+public class TestBadIdentifiers extends TestCase {
+
+ public void testCompilation() {
+ // If this compiles, it means the generation was correct.
+ TestBadIdentifiersProto.Deprecated.newBuilder();
+ TestBadIdentifiersProto.Override.newBuilder();
+ }
}

Powered by Google App Engine
This is Rietveld 408576698