From 08d67d7163688a28e7bcae78339e1fe9710437a8 Mon Sep 17 00:00:00 2001 From: Nobuaki Sukegawa Date: Fri, 19 Feb 2016 00:49:29 +0900 Subject: [PATCH] THRIFT-3644 Adds testStruct call to Lua test client Client: Test (Lua) Patch: Nobuaki Sukegawa This closes #875 --- test/lua/test_basic_client.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/lua/test_basic_client.lua b/test/lua/test_basic_client.lua index dcaca293e..fea426d9e 100644 --- a/test/lua/test_basic_client.lua +++ b/test/lua/test_basic_client.lua @@ -157,15 +157,17 @@ function testBasicClient(rawArgs) assertEqual(client:testDouble(a), b, 'Failed testDouble 5') -- Struct - local a = { + local o = Xtruct:new{ string_thing = 'Zero', byte_thing = 1, i32_thing = -3, i64_thing = long(-5) } - - -- TODO fix client struct equality - --assertEqual(client:testStruct(a), a, 'Failed testStruct') + local r = client:testStruct(o) + assertEqual(o.string_thing, r.string_thing, 'Failed testStruct 1') + assertEqual(o.byte_thing, r.byte_thing, 'Failed testStruct 2') + assertEqual(o.i32_thing, r.i32_thing, 'Failed testStruct 3') + assertEqual(o.i64_thing, r.i64_thing, 'Failed testStruct 4') -- TODO add list map set exception etc etc end