From f1ce60e7b45c16affa4c8a92a9a129755c5fcfd5 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Sat, 3 Dec 2016 11:51:25 -0500 Subject: 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. --- conformance/conformance_ruby.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'conformance/conformance_ruby.rb') diff --git a/conformance/conformance_ruby.rb b/conformance/conformance_ruby.rb index aa572144..b7b7cf1c 100755 --- a/conformance/conformance_ruby.rb +++ b/conformance/conformance_ruby.rb @@ -31,20 +31,21 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. require 'conformance_pb' +require 'google/protobuf/test_messages_proto3_pb' $test_count = 0 $verbose = false def do_test(request) - test_message = Conformance::TestAllTypes.new + test_message = ProtobufTestMessages::Proto3::TestAllTypes.new response = Conformance::ConformanceResponse.new begin case request.payload when :protobuf_payload begin - test_message = - Conformance::TestAllTypes.decode(request.protobuf_payload) + test_message = ProtobufTestMessages::Proto3::TestAllTypes.decode( + request.protobuf_payload) rescue Google::Protobuf::ParseError => err response.parse_error = err.message.encode('utf-8') return response @@ -52,7 +53,8 @@ def do_test(request) when :json_payload begin - test_message = Conformance::TestAllTypes.decode_json(request.json_payload) + test_message = ProtobufTestMessages::Proto3::TestAllTypes.decode_json( + request.json_payload) rescue Google::Protobuf::ParseError => err response.parse_error = err.message.encode('utf-8') return response -- cgit v1.2.3