diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2016-12-03 11:51:25 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-03 11:51:25 -0500 |
commit | f1ce60e7b45c16affa4c8a92a9a129755c5fcfd5 (patch) | |
tree | b71a425660fc225154547f542ff1dbe0e342ade3 /csharp/src/Google.Protobuf.Conformance/Program.cs | |
parent | 4280c2740300f414d95a5f282426f25f5b13e05d (diff) | |
download | protobuf-f1ce60e7b45c16affa4c8a92a9a129755c5fcfd5.tar.gz protobuf-f1ce60e7b45c16affa4c8a92a9a129755c5fcfd5.tar.bz2 protobuf-f1ce60e7b45c16affa4c8a92a9a129755c5fcfd5.zip |
Factored Conformance and Benchmark test messages into shared test schema. (#1971)
* Factored Conformance test messages into shared test schema.
* Updated benchmarks to use new proto3 message locations.
* Fixed include path.
* Conformance: fixed include of Python test messages.
* Make maven in Rakefile use --batch-mode.
* Revert changes to benchmarks.
On second thought I think a separate schema for
CPU benchmarking makes sense.
* Try regenerating C# protos for new test protos.
* Removed benchmark messages from test proto.
* Added Jon Skeet's fixes for C#.
* Removed duplicate/old test messages C# file.
* C# fixes for test schema move.
* Fixed C# to use the correct TestAllTypes message.
* Fixes for Objective C test schema move.
* Added missing EXTRA_DIST file.
Diffstat (limited to 'csharp/src/Google.Protobuf.Conformance/Program.cs')
-rw-r--r-- | csharp/src/Google.Protobuf.Conformance/Program.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/csharp/src/Google.Protobuf.Conformance/Program.cs b/csharp/src/Google.Protobuf.Conformance/Program.cs index 19827c48..00ee64f8 100644 --- a/csharp/src/Google.Protobuf.Conformance/Program.cs +++ b/csharp/src/Google.Protobuf.Conformance/Program.cs @@ -48,7 +48,7 @@ namespace Google.Protobuf.Conformance // This way we get the binary streams instead of readers/writers. var input = new BinaryReader(Console.OpenStandardInput()); var output = new BinaryWriter(Console.OpenStandardOutput()); - var typeRegistry = TypeRegistry.FromMessages(TestAllTypes.Descriptor); + var typeRegistry = TypeRegistry.FromMessages(ProtobufTestMessages.Proto3.TestAllTypes.Descriptor); int count = 0; while (RunTest(input, output, typeRegistry)) @@ -81,17 +81,17 @@ namespace Google.Protobuf.Conformance private static ConformanceResponse PerformRequest(ConformanceRequest request, TypeRegistry typeRegistry) { - TestAllTypes message; + ProtobufTestMessages.Proto3.TestAllTypes message; try { switch (request.PayloadCase) { case ConformanceRequest.PayloadOneofCase.JsonPayload: var parser = new JsonParser(new JsonParser.Settings(20, typeRegistry)); - message = parser.Parse<TestAllTypes>(request.JsonPayload); + message = parser.Parse<ProtobufTestMessages.Proto3.TestAllTypes>(request.JsonPayload); break; case ConformanceRequest.PayloadOneofCase.ProtobufPayload: - message = TestAllTypes.Parser.ParseFrom(request.ProtobufPayload); + message = ProtobufTestMessages.Proto3.TestAllTypes.Parser.ParseFrom(request.ProtobufPayload); break; default: throw new Exception("Unsupported request payload: " + request.PayloadCase); |