From 2f34da70243675c4d8e04f368522046fe99dcb50 Mon Sep 17 00:00:00 2001 From: henrique Date: Thu, 5 Feb 2015 12:39:34 +1100 Subject: [PATCH] THRIFT-2951 Fix Erlang name conflict test Patch: Nobuaki Sukegawa This closes #360 ---- commit 06cc3e990ade560461a276991ce9cb544706dae3 Author: Nobuaki Sukegawa Date: 2015-01-27T18:11:40Z THRIFT-2951 Fix Erlang name conflict test ---- --- test/NameConflictTest.thrift | 4 ++-- test/erl/src/name_conflict_test.erl | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/test/NameConflictTest.thrift b/test/NameConflictTest.thrift index e0d351c1e2d..d3efb474cbd 100644 --- a/test/NameConflictTest.thrift +++ b/test/NameConflictTest.thrift @@ -19,8 +19,8 @@ struct get { struct partial { 1: using using - 2: bool read - 3: bool write + 2: bool read + 3: bool write } enum Maybe { diff --git a/test/erl/src/name_conflict_test.erl b/test/erl/src/name_conflict_test.erl index a38eff08854..5576ffaf095 100644 --- a/test/erl/src/name_conflict_test.erl +++ b/test/erl/src/name_conflict_test.erl @@ -39,7 +39,7 @@ record_generation_test_() -> #get{sbyte=null} )}, {"partial record", ?_assertMatch( - {partial, _}, + {partial, _, _, _}, #partial{using=null} )}, {"ClassAndProp record", ?_assertMatch( @@ -119,7 +119,11 @@ struct_info_test_() -> name_conflict_test_types:struct_info(get) )}, {"partial definition", ?_assertEqual( - {struct, [{1, {struct, {name_conflict_test_types, using}}}]}, + {struct, [ + {1, {struct, {name_conflict_test_types, using}}}, + {2, bool}, + {3, bool} + ]}, name_conflict_test_types:struct_info(partial) )}, {"ClassAndProp definition", ?_assertEqual( @@ -177,7 +181,9 @@ struct_info_test_() -> )}, {"partial extended definition", ?_assertEqual( {struct, [ - {1, undefined, {struct, {name_conflict_test_types, using}}, using, #using{}} + {1, undefined, {struct, {name_conflict_test_types, using}}, using, #using{}}, + {2, undefined, bool, read, undefined}, + {3, undefined, bool, write, undefined} ]}, name_conflict_test_types:struct_info_ext(partial) )},