aboutsummaryrefslogtreecommitdiff
path: root/conformance/conformance_ruby.rb
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2016-12-03 11:51:25 -0500
committerGitHub <noreply@github.com>2016-12-03 11:51:25 -0500
commitf1ce60e7b45c16affa4c8a92a9a129755c5fcfd5 (patch)
treeb71a425660fc225154547f542ff1dbe0e342ade3 /conformance/conformance_ruby.rb
parent4280c2740300f414d95a5f282426f25f5b13e05d (diff)
downloadprotobuf-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 'conformance/conformance_ruby.rb')
-rwxr-xr-xconformance/conformance_ruby.rb10
1 files changed, 6 insertions, 4 deletions
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