]> asedeno.scripts.mit.edu Git - cl-protobufs.git/blob - tests/extend-test.proto
asdf-support: simplify do-process-import calling
[cl-protobufs.git] / tests / extend-test.proto
1 // Free Software published under an MIT-like license. See LICENSE
2 //
3 // Copyright (c) 2012 Google, Inc.  All rights reserved.
4 //
5 // Original author: Alejandro SedeƱo
6
7 syntax = "proto2";
8
9 import "extend-test-base.proto";
10
11 package protobuf_extend_unittest;
12
13 message Foo {
14   extensions 200 to 299;
15 }
16
17 message Bar {
18   // Extend file-local Foo with this Bar.
19   extend Foo {
20     optional Bar foo_227 = 227;
21   }
22   // Extend file-local Foo with imported Bar.
23   extend Foo {
24     optional protobuf_extend_base_unittest.Bar foo_228 = 228;
25   }
26   // Extend imported Foo with this Bar.
27   extend protobuf_extend_base_unittest.Foo {
28     optional Bar foo_127 = 127;
29   }
30   // Extend imported Foo with imported Bar.
31   extend protobuf_extend_base_unittest.Foo {
32     optional protobuf_extend_base_unittest.Bar foo_128 = 128;
33   }
34 }
35
36 // NB: Unlike Foo and Bar, no Quux is defined in our import.
37 //     Unlike Foo and Bar, no Baz is defined in this proto file.
38 message Quux {
39   // Extend imported Baz with self.
40   extend protobuf_extend_base_unittest.Baz {
41     optional Quux ext = 327;
42   }
43 }