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

Unified Diff: test/protos/dart_name.proto

Issue 2043913005: Change how to set the Dart name of a field (Closed) Base URL: git@github.com:dart-lang/dart-protoc-plugin.git@master
Patch Set: better error checking, clean up pubspec Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: test/protos/dart_name.proto
diff --git a/test/protos/dart_name.proto b/test/protos/dart_name.proto
new file mode 100644
index 0000000000000000000000000000000000000000..33b157b2ae77a50438b687e15faddd565d218faa
--- /dev/null
+++ b/test/protos/dart_name.proto
@@ -0,0 +1,31 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+syntax = "proto2";
+
+import "dart_options.proto";
+
+package dart_name;
+
+message DartName {
+ optional string field = 1 [
+ (dart_options.dart_name) = "renamedField"
+ ];
+}
+
+message SwapNames {
+ optional string first = 1 [
+ (dart_options.dart_name) = "second"
+ ];
+ optional string second = 2 [
+ (dart_options.dart_name) = "first"
+ ];
+}
+
+message TakeExistingName {
+ optional string first = 1;
+ optional string second = 2 [
+ (dart_options.dart_name) = "first"
+ ];
+}

Powered by Google App Engine
This is Rietveld 408576698