kythe.io@v0.0.68-0.20240422202219-7225dbc01741/kythe/cxx/indexer/proto/testdata/corner_cases/import_syntax.proto (about)

     1  // Test file to exercise the multi-line import syntax cases raised by bugs like
     2  // b/12113401.
     3  
     4  syntax = "proto2";
     5  
     6  //- @"package proto_kythe_test;" ref ThePackage
     7  package proto_kythe_test;
     8  option java_package = "io.kythe";
     9  
    10  //- @"import \"kythe/cxx/indexer/proto/testdata/other-package.proto\";" ref/includes _OtherPackageImport
    11  import "kythe/cxx/indexer/proto/testdata/other-package.proto";
    12  import "kythe/cxx/indexer/proto/testdata/basic/nested-message.proto";
    13  //- @"import public \"kythe/cxx/indexer/proto/testdata/basic/oneof.proto\";" ref/includes _PublicImport
    14  import public "kythe/cxx/indexer/proto/testdata/basic/oneof.proto";
    15  
    16  // Message to test for various syntax expressions of referring to a message
    17  // defined in a namespace.
    18  message TestMessage {
    19    //- @Foo ref FooMessage
    20    optional itsapackage.Foo test_foo = 1;
    21    //- @+2"Bar" ref BarMessage
    22    optional itsapackage.
    23    Bar test_bar = 2;
    24  
    25    //- @+2"Baz" ref BazMessage
    26    optional itsapackage
    27    .Baz test_baz = 3;
    28  
    29    // Here the base case is already covered in nested-message-field.proto
    30    //- @+2"NestedMessage" ref NestedMessage
    31    optional ParentMessage.
    32    NestedMessage test_nested_import = 4;
    33  
    34    //- @+2"NestedMessage" ref NestedMessage
    35    optional ParentMessage
    36    .NestedMessage test_nested_import_again = 5;
    37  }