Rename files and revert changes to generate protos script

pull/6938/head
Sydney Acksman 5 years ago
parent 34f9497162
commit 367fd27732
  1. 12
      Makefile.am
  2. 30
      csharp/generate_protos.sh
  3. 0
      csharp/protos/unittest_issue6936_a.proto
  4. 4
      csharp/protos/unittest_issue6936_b.proto
  5. 4
      csharp/protos/unittest_issue6936_c.proto
  6. 24
      csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssue6936A.cs
  7. 20
      csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssue6936B.cs
  8. 24
      csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssue6936C.cs
  9. 6
      csharp/src/Google.Protobuf.Test/Reflection/CustomOptionsTest.cs
  10. BIN
      csharp/src/Google.Protobuf.Test/testprotos.pb

@ -65,12 +65,12 @@ csharp_EXTRA_DIST= \
csharp/keys/Google.Protobuf.snk \
csharp/keys/README.md \
csharp/protos/README.md \
csharp/protos/extensions/extensions_a.proto \
csharp/protos/extensions/extensions_b.proto \
csharp/protos/extensions/extensions_c.proto \
csharp/protos/map_unittest_proto3.proto \
csharp/protos/old_extensions1.proto \
csharp/protos/old_extensions2.proto \
csharp/protos/unittest_issue6936_a.proto \
csharp/protos/unittest_issue6936_b.proto \
csharp/protos/unittest_issue6936_c.proto \
csharp/protos/unittest_custom_options_proto3.proto \
csharp/protos/unittest_import_public_proto3.proto \
csharp/protos/unittest_import_public.proto \
@ -131,9 +131,9 @@ csharp_EXTRA_DIST= \
csharp/src/Google.Protobuf.Test/SampleNaNs.cs \
csharp/src/Google.Protobuf.Test/TestCornerCases.cs \
csharp/src/Google.Protobuf.Test.TestProtos/Google.Protobuf.Test.TestProtos.csproj \
csharp/src/Google.Protobuf.Test.TestProtos/ExtensionsA.cs \
csharp/src/Google.Protobuf.Test.TestProtos/ExtensionsB.cs \
csharp/src/Google.Protobuf.Test.TestProtos/ExtensionsC.cs \
csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssue6936A.cs \
csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssue6936B.cs \
csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssue6936C.cs \
csharp/src/Google.Protobuf.Test.TestProtos/ForeignMessagePartial.cs \
csharp/src/Google.Protobuf.Test.TestProtos/MapUnittestProto3.cs \
csharp/src/Google.Protobuf.Test.TestProtos/OldExtensions1.cs \

@ -49,21 +49,21 @@ $PROTOC -Isrc -Icsharp/protos \
--descriptor_set_out=csharp/src/Google.Protobuf.Test/testprotos.pb \
--include_source_info \
--include_imports \
map_unittest_proto3.proto \
unittest_issues.proto \
unittest_custom_options_proto3.proto \
unittest_proto3.proto \
unittest_import_proto3.proto \
unittest_import_public_proto3.proto \
unittest.proto \
unittest_import.proto \
unittest_import_public.proto \
extensions_issue6936_a.proto \
extensions_issue6936_b.proto \
extensions_issue6936_c.proto \
google/protobuf/unittest_well_known_types.proto \
google/protobuf/test_messages_proto3.proto \
google/protobuf/test_messages_proto2.proto
csharp/protos/map_unittest_proto3.proto \
csharp/protos/unittest_issues.proto \
csharp/protos/unittest_custom_options_proto3.proto \
csharp/protos/unittest_proto3.proto \
csharp/protos/unittest_import_proto3.proto \
csharp/protos/unittest_import_public_proto3.proto \
csharp/protos/unittest.proto \
csharp/protos/unittest_import.proto \
csharp/protos/unittest_import_public.proto \
csharp/protos/unittest_issue6936_a.proto \
csharp/protos/unittest_issue6936_b.proto \
csharp/protos/unittest_issue6936_c.proto \
src/google/protobuf/unittest_well_known_types.proto \
src/google/protobuf/test_messages_proto3.proto \
src/google/protobuf/test_messages_proto2.proto
# AddressBook sample protos
$PROTOC -Iexamples -Isrc --csharp_out=csharp/src/AddressBook \

@ -1,13 +1,13 @@
syntax = "proto3";
import "extensions_issue6936_a.proto";
import "unittest_issue6936_a.proto";
package unittest_issues;
option csharp_namespace = "UnitTest.Issues.TestProtos";
// This file is used as part of a unit test for issue 6936
// We don't need to use it, we just have to import it in "extensions_issue6936_c.proto"
// We don't need to use it, we just have to import it in "unittest_issue6936_c.proto"
message Foo {
option (opt) = "foo";

@ -1,7 +1,7 @@
syntax = "proto3";
import "extensions_issue6936_a.proto";
import "extensions_issue6936_b.proto";
import "unittest_issue6936_a.proto";
import "unittest_issue6936_b.proto";
package unittest_issues;

@ -1,6 +1,6 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: extensions_issue6936_a.proto
// source: unittest_issue6936_a.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
@ -11,32 +11,32 @@ using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace UnitTest.Issues.TestProtos {
/// <summary>Holder for reflection information generated from extensions_issue6936_a.proto</summary>
public static partial class ExtensionsIssue6936AReflection {
/// <summary>Holder for reflection information generated from unittest_issue6936_a.proto</summary>
public static partial class UnittestIssue6936AReflection {
#region Descriptor
/// <summary>File descriptor for extensions_issue6936_a.proto</summary>
/// <summary>File descriptor for unittest_issue6936_a.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static ExtensionsIssue6936AReflection() {
static UnittestIssue6936AReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"ChxleHRlbnNpb25zX2lzc3VlNjkzNl9hLnByb3RvEg91bml0dGVzdF9pc3N1",
"ZXMaIGdvb2dsZS9wcm90b2J1Zi9kZXNjcmlwdG9yLnByb3RvOi4KA29wdBIf",
"Lmdvb2dsZS5wcm90b2J1Zi5NZXNzYWdlT3B0aW9ucxjQhgMgASgJQh2qAhpV",
"bml0VGVzdC5Jc3N1ZXMuVGVzdFByb3Rvc2IGcHJvdG8z"));
"Chp1bml0dGVzdF9pc3N1ZTY5MzZfYS5wcm90bxIPdW5pdHRlc3RfaXNzdWVz",
"GiBnb29nbGUvcHJvdG9idWYvZGVzY3JpcHRvci5wcm90bzouCgNvcHQSHy5n",
"b29nbGUucHJvdG9idWYuTWVzc2FnZU9wdGlvbnMY0IYDIAEoCUIdqgIaVW5p",
"dFRlc3QuSXNzdWVzLlRlc3RQcm90b3NiBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, new pb::Extension[] { ExtensionsIssue6936AExtensions.Opt }, null));
new pbr::GeneratedClrTypeInfo(null, new pb::Extension[] { UnittestIssue6936AExtensions.Opt }, null));
}
#endregion
}
/// <summary>Holder for extension identifiers generated from the top level of extensions_issue6936_a.proto</summary>
public static partial class ExtensionsIssue6936AExtensions {
/// <summary>Holder for extension identifiers generated from the top level of unittest_issue6936_a.proto</summary>
public static partial class UnittestIssue6936AExtensions {
public static readonly pb::Extension<global::Google.Protobuf.Reflection.MessageOptions, string> Opt =
new pb::Extension<global::Google.Protobuf.Reflection.MessageOptions, string>(50000, pb::FieldCodec.ForString(400002, ""));
}

@ -1,6 +1,6 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: extensions_issue6936_b.proto
// source: unittest_issue6936_b.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
@ -11,24 +11,24 @@ using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace UnitTest.Issues.TestProtos {
/// <summary>Holder for reflection information generated from extensions_issue6936_b.proto</summary>
public static partial class ExtensionsIssue6936BReflection {
/// <summary>Holder for reflection information generated from unittest_issue6936_b.proto</summary>
public static partial class UnittestIssue6936BReflection {
#region Descriptor
/// <summary>File descriptor for extensions_issue6936_b.proto</summary>
/// <summary>File descriptor for unittest_issue6936_b.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static ExtensionsIssue6936BReflection() {
static UnittestIssue6936BReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"ChxleHRlbnNpb25zX2lzc3VlNjkzNl9iLnByb3RvEg91bml0dGVzdF9pc3N1",
"ZXMaHGV4dGVuc2lvbnNfaXNzdWU2OTM2X2EucHJvdG8iDgoDRm9vOgeCtRgD",
"Zm9vQh2qAhpVbml0VGVzdC5Jc3N1ZXMuVGVzdFByb3Rvc2IGcHJvdG8z"));
"Chp1bml0dGVzdF9pc3N1ZTY5MzZfYi5wcm90bxIPdW5pdHRlc3RfaXNzdWVz",
"Ghp1bml0dGVzdF9pc3N1ZTY5MzZfYS5wcm90byIOCgNGb286B4K1GANmb29C",
"HaoCGlVuaXRUZXN0Lklzc3Vlcy5UZXN0UHJvdG9zYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::UnitTest.Issues.TestProtos.ExtensionsIssue6936AReflection.Descriptor, },
new pbr::FileDescriptor[] { global::UnitTest.Issues.TestProtos.UnittestIssue6936AReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.Foo), global::UnitTest.Issues.TestProtos.Foo.Parser, null, null, null, null, null)
}));
@ -45,7 +45,7 @@ namespace UnitTest.Issues.TestProtos {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::UnitTest.Issues.TestProtos.ExtensionsIssue6936BReflection.Descriptor.MessageTypes[0]; }
get { return global::UnitTest.Issues.TestProtos.UnittestIssue6936BReflection.Descriptor.MessageTypes[0]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]

@ -1,6 +1,6 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: extensions_issue6936_c.proto
// source: unittest_issue6936_c.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
@ -11,26 +11,26 @@ using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace UnitTest.Issues.TestProtos {
/// <summary>Holder for reflection information generated from extensions_issue6936_c.proto</summary>
public static partial class ExtensionsIssue6936CReflection {
/// <summary>Holder for reflection information generated from unittest_issue6936_c.proto</summary>
public static partial class UnittestIssue6936CReflection {
#region Descriptor
/// <summary>File descriptor for extensions_issue6936_c.proto</summary>
/// <summary>File descriptor for unittest_issue6936_c.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static ExtensionsIssue6936CReflection() {
static UnittestIssue6936CReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"ChxleHRlbnNpb25zX2lzc3VlNjkzNl9jLnByb3RvEg91bml0dGVzdF9pc3N1",
"ZXMaHGV4dGVuc2lvbnNfaXNzdWU2OTM2X2EucHJvdG8aHGV4dGVuc2lvbnNf",
"aXNzdWU2OTM2X2IucHJvdG8iMQoDQmFyEiEKA2ZvbxgBIAEoCzIULnVuaXR0",
"ZXN0X2lzc3Vlcy5Gb286B4K1GANiYXJCHaoCGlVuaXRUZXN0Lklzc3Vlcy5U",
"ZXN0UHJvdG9zYgZwcm90bzM="));
"Chp1bml0dGVzdF9pc3N1ZTY5MzZfYy5wcm90bxIPdW5pdHRlc3RfaXNzdWVz",
"Ghp1bml0dGVzdF9pc3N1ZTY5MzZfYS5wcm90bxoadW5pdHRlc3RfaXNzdWU2",
"OTM2X2IucHJvdG8iMQoDQmFyEiEKA2ZvbxgBIAEoCzIULnVuaXR0ZXN0X2lz",
"c3Vlcy5Gb286B4K1GANiYXJCHaoCGlVuaXRUZXN0Lklzc3Vlcy5UZXN0UHJv",
"dG9zYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::UnitTest.Issues.TestProtos.ExtensionsIssue6936AReflection.Descriptor, global::UnitTest.Issues.TestProtos.ExtensionsIssue6936BReflection.Descriptor, },
new pbr::FileDescriptor[] { global::UnitTest.Issues.TestProtos.UnittestIssue6936AReflection.Descriptor, global::UnitTest.Issues.TestProtos.UnittestIssue6936BReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.Bar), global::UnitTest.Issues.TestProtos.Bar.Parser, new[]{ "Foo" }, null, null, null, null)
}));
@ -47,7 +47,7 @@ namespace UnitTest.Issues.TestProtos {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::UnitTest.Issues.TestProtos.ExtensionsIssue6936CReflection.Descriptor.MessageTypes[0]; }
get { return global::UnitTest.Issues.TestProtos.UnittestIssue6936CReflection.Descriptor.MessageTypes[0]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]

@ -196,11 +196,11 @@ namespace Google.Protobuf.Test.Reflection
[Test]
public void MultipleImportOfSameFileWithExtension()
{
var descriptor = ExtensionsIssue6936CReflection.Descriptor;
var descriptor = UnittestIssue6936CReflection.Descriptor;
var foo = Foo.Descriptor;
var bar = Bar.Descriptor;
AssertOption("foo", foo.CustomOptions.TryGetString, ExtensionsIssue6936AExtensions.Opt, foo.GetOption);
AssertOption("bar", bar.CustomOptions.TryGetString, ExtensionsIssue6936AExtensions.Opt, bar.GetOption);
AssertOption("foo", foo.CustomOptions.TryGetString, UnittestIssue6936AExtensions.Opt, foo.GetOption);
AssertOption("bar", bar.CustomOptions.TryGetString, UnittestIssue6936AExtensions.Opt, bar.GetOption);
}
private void AssertOption<T, D>(T expected, OptionFetcher<T> fetcher, Extension<D, T> extension, Func<Extension<D, T>, T> descriptorOptionFetcher) where D : IExtendableMessage<D>

Loading…
Cancel
Save