summaryrefslogtreecommitdiff
path: root/test/rb
diff options
context:
space:
mode:
authorJens Geyer <jensg@apache.org>2015-10-02 00:38:17 +0200
committerJens Geyer <jensg@apache.org>2015-10-02 00:38:17 +0200
commit123258ba60facd8581d868c71a543487b2acff3c (patch)
tree5470f572ed148f86eff5280e80f17ceaa48ff2be /test/rb
parent96409d9dfecd8213726ee83ff1ac40695f8eeeec (diff)
downloadthrift-123258ba60facd8581d868c71a543487b2acff3c.tar.gz
THRIFT-3364 Fix ruby binary field encoding in TJSONProtocol
Client: Ruby Patch: Nobuaki Sukegawa <nsukeg@gmail.com> This closes #633
Diffstat (limited to 'test/rb')
-rw-r--r--test/rb/Gemfile1
-rwxr-xr-xtest/rb/integration/TestClient.rb2
-rwxr-xr-xtest/rb/integration/TestServer.rb2
3 files changed, 4 insertions, 1 deletions
diff --git a/test/rb/Gemfile b/test/rb/Gemfile
index 8301e4424..58c04aab0 100644
--- a/test/rb/Gemfile
+++ b/test/rb/Gemfile
@@ -4,3 +4,4 @@ require "rubygems"
gem "rack", "~> 1.5.2"
gem "thin", "~> 1.5.0"
+gem "test-unit"
diff --git a/test/rb/integration/TestClient.rb b/test/rb/integration/TestClient.rb
index b31a02412..fb339c438 100755
--- a/test/rb/integration/TestClient.rb
+++ b/test/rb/integration/TestClient.rb
@@ -125,7 +125,7 @@ class SimpleClientTest < Test::Unit::TestCase
def test_binary
p 'test_binary'
- val = [42, 0, 142, 242]
+ val = (0...256).reverse_each.to_a
ret = @client.testBinary(val.pack('C*'))
assert_equal(val, ret.bytes.to_a)
end
diff --git a/test/rb/integration/TestServer.rb b/test/rb/integration/TestServer.rb
index 0021e2ad3..bab723a05 100755
--- a/test/rb/integration/TestServer.rb
+++ b/test/rb/integration/TestServer.rb
@@ -32,6 +32,8 @@ class SimpleHandler
:testEnum, :testTypedef, :testMultiException].each do |meth|
define_method(meth) do |thing|
+ p meth
+ p thing
thing
end