From a85c4a329917f641b98bf71723285ccae14f2a8f Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Wed, 30 Oct 2019 14:10:36 -0500 Subject: [PATCH] Move generated test code to a seperate lib --- csharp/generate_protos.sh | 2 +- .../ForeignMessagePartial.cs | 0 .../Google.Protobuf.Test.CodeGen.csproj | 15 +++++++++++++++ .../MapUnittestProto3.cs | 0 .../TestMessagesProto2.cs | 0 .../TestMessagesProto3.cs | 0 .../Unittest.cs | 0 .../UnittestCustomOptionsProto3.cs | 0 .../UnittestImport.cs | 0 .../UnittestImportProto3.cs | 0 .../UnittestImportPublic.cs | 0 .../UnittestImportPublicProto3.cs | 0 .../UnittestIssues.cs | 0 .../UnittestProto3.cs | 0 .../UnittestWellKnownTypes.cs | 0 .../Google.Protobuf.Test.csproj | 1 + 16 files changed, 17 insertions(+), 1 deletion(-) rename csharp/src/{Google.Protobuf.Test/TestProtos => Google.Protobuf.Test.CodeGen}/ForeignMessagePartial.cs (100%) create mode 100644 csharp/src/Google.Protobuf.Test.CodeGen/Google.Protobuf.Test.CodeGen.csproj rename csharp/src/{Google.Protobuf.Test/TestProtos => Google.Protobuf.Test.CodeGen}/MapUnittestProto3.cs (100%) rename csharp/src/{Google.Protobuf.Test/TestProtos => Google.Protobuf.Test.CodeGen}/TestMessagesProto2.cs (100%) rename csharp/src/{Google.Protobuf.Test/TestProtos => Google.Protobuf.Test.CodeGen}/TestMessagesProto3.cs (100%) rename csharp/src/{Google.Protobuf.Test/TestProtos => Google.Protobuf.Test.CodeGen}/Unittest.cs (100%) rename csharp/src/{Google.Protobuf.Test/TestProtos => Google.Protobuf.Test.CodeGen}/UnittestCustomOptionsProto3.cs (100%) rename csharp/src/{Google.Protobuf.Test/TestProtos => Google.Protobuf.Test.CodeGen}/UnittestImport.cs (100%) rename csharp/src/{Google.Protobuf.Test/TestProtos => Google.Protobuf.Test.CodeGen}/UnittestImportProto3.cs (100%) rename csharp/src/{Google.Protobuf.Test/TestProtos => Google.Protobuf.Test.CodeGen}/UnittestImportPublic.cs (100%) rename csharp/src/{Google.Protobuf.Test/TestProtos => Google.Protobuf.Test.CodeGen}/UnittestImportPublicProto3.cs (100%) rename csharp/src/{Google.Protobuf.Test/TestProtos => Google.Protobuf.Test.CodeGen}/UnittestIssues.cs (100%) rename csharp/src/{Google.Protobuf.Test/TestProtos => Google.Protobuf.Test.CodeGen}/UnittestProto3.cs (100%) rename csharp/src/{Google.Protobuf.Test/TestProtos => Google.Protobuf.Test.CodeGen}/UnittestWellKnownTypes.cs (100%) diff --git a/csharp/generate_protos.sh b/csharp/generate_protos.sh index 1083d671c1..b37bdc6134 100755 --- a/csharp/generate_protos.sh +++ b/csharp/generate_protos.sh @@ -45,7 +45,7 @@ $PROTOC -Isrc --csharp_out=csharp/src/Google.Protobuf \ # and old_extensions2.proto, which are generated with an older version # of protoc. $PROTOC -Isrc -Icsharp/protos \ - --csharp_out=csharp/src/Google.Protobuf.Test/TestProtos \ + --csharp_out=csharp/src/Google.Protobuf.Test.CodeGen \ --descriptor_set_out=csharp/src/Google.Protobuf.Test/testprotos.pb \ --include_source_info \ --include_imports \ diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/ForeignMessagePartial.cs b/csharp/src/Google.Protobuf.Test.CodeGen/ForeignMessagePartial.cs similarity index 100% rename from csharp/src/Google.Protobuf.Test/TestProtos/ForeignMessagePartial.cs rename to csharp/src/Google.Protobuf.Test.CodeGen/ForeignMessagePartial.cs diff --git a/csharp/src/Google.Protobuf.Test.CodeGen/Google.Protobuf.Test.CodeGen.csproj b/csharp/src/Google.Protobuf.Test.CodeGen/Google.Protobuf.Test.CodeGen.csproj new file mode 100644 index 0000000000..dd4cd84e56 --- /dev/null +++ b/csharp/src/Google.Protobuf.Test.CodeGen/Google.Protobuf.Test.CodeGen.csproj @@ -0,0 +1,15 @@ + + + + net451;netstandard1.0 + ../../keys/Google.Protobuf.snk + true + true + False + + + + + + + diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/MapUnittestProto3.cs b/csharp/src/Google.Protobuf.Test.CodeGen/MapUnittestProto3.cs similarity index 100% rename from csharp/src/Google.Protobuf.Test/TestProtos/MapUnittestProto3.cs rename to csharp/src/Google.Protobuf.Test.CodeGen/MapUnittestProto3.cs diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs b/csharp/src/Google.Protobuf.Test.CodeGen/TestMessagesProto2.cs similarity index 100% rename from csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs rename to csharp/src/Google.Protobuf.Test.CodeGen/TestMessagesProto2.cs diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto3.cs b/csharp/src/Google.Protobuf.Test.CodeGen/TestMessagesProto3.cs similarity index 100% rename from csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto3.cs rename to csharp/src/Google.Protobuf.Test.CodeGen/TestMessagesProto3.cs diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs b/csharp/src/Google.Protobuf.Test.CodeGen/Unittest.cs similarity index 100% rename from csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs rename to csharp/src/Google.Protobuf.Test.CodeGen/Unittest.cs diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestCustomOptionsProto3.cs b/csharp/src/Google.Protobuf.Test.CodeGen/UnittestCustomOptionsProto3.cs similarity index 100% rename from csharp/src/Google.Protobuf.Test/TestProtos/UnittestCustomOptionsProto3.cs rename to csharp/src/Google.Protobuf.Test.CodeGen/UnittestCustomOptionsProto3.cs diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestImport.cs b/csharp/src/Google.Protobuf.Test.CodeGen/UnittestImport.cs similarity index 100% rename from csharp/src/Google.Protobuf.Test/TestProtos/UnittestImport.cs rename to csharp/src/Google.Protobuf.Test.CodeGen/UnittestImport.cs diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportProto3.cs b/csharp/src/Google.Protobuf.Test.CodeGen/UnittestImportProto3.cs similarity index 100% rename from csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportProto3.cs rename to csharp/src/Google.Protobuf.Test.CodeGen/UnittestImportProto3.cs diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublic.cs b/csharp/src/Google.Protobuf.Test.CodeGen/UnittestImportPublic.cs similarity index 100% rename from csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublic.cs rename to csharp/src/Google.Protobuf.Test.CodeGen/UnittestImportPublic.cs diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublicProto3.cs b/csharp/src/Google.Protobuf.Test.CodeGen/UnittestImportPublicProto3.cs similarity index 100% rename from csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublicProto3.cs rename to csharp/src/Google.Protobuf.Test.CodeGen/UnittestImportPublicProto3.cs diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs b/csharp/src/Google.Protobuf.Test.CodeGen/UnittestIssues.cs similarity index 100% rename from csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs rename to csharp/src/Google.Protobuf.Test.CodeGen/UnittestIssues.cs diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs b/csharp/src/Google.Protobuf.Test.CodeGen/UnittestProto3.cs similarity index 100% rename from csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs rename to csharp/src/Google.Protobuf.Test.CodeGen/UnittestProto3.cs diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs b/csharp/src/Google.Protobuf.Test.CodeGen/UnittestWellKnownTypes.cs similarity index 100% rename from csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs rename to csharp/src/Google.Protobuf.Test.CodeGen/UnittestWellKnownTypes.cs diff --git a/csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj b/csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj index 7fff91283b..102c7acf2b 100644 --- a/csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj +++ b/csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj @@ -10,6 +10,7 @@ +