THRIFT-2628 struct member name conflicts due to lowercased names
Client: Erlang
Patch: Alisdair Sullivan
This closes #228
diff --git a/lib/erl/test/test_thrift_1151.erl b/lib/erl/test/test_thrift_1151.erl
index 8b1d937..f4a910e 100644
--- a/lib/erl/test/test_thrift_1151.erl
+++ b/lib/erl/test/test_thrift_1151.erl
@@ -6,19 +6,29 @@
-include_lib("eunit/include/eunit.hrl").
unmatched_struct_test() ->
- S1 = #structC{x=#structB{x=1}},
+ S1 = #'StructC'{x=#'StructB'{x=1}},
{ok, Transport} = thrift_memory_buffer:new(),
{ok, Protocol} = thrift_binary_protocol:new(Transport),
- ?assertException (error, struct_unmatched,
- thrift_protocol:write(Protocol,
- {{struct, element(2, thrift1151_types:struct_info('structC'))}, S1})).
+ ?assertException(
+ error,
+ struct_unmatched,
+ thrift_protocol:write(
+ Protocol,
+ {{struct, element(2, thrift1151_types:struct_info('StructC'))}, S1}
+ )
+ ).
badarg_test() ->
- S2 = #structC{x=#structA{x="1"}},
+ S2 = #'StructC'{x=#'StructA'{x="1"}},
{ok, Transport} = thrift_memory_buffer:new(),
{ok, Protocol} = thrift_binary_protocol:new(Transport),
- ?assertException (error, badarg,
- thrift_protocol:write(Protocol,
- {{struct, element(2, thrift1151_types:struct_info('structC'))}, S2})).
+ ?assertException(
+ error,
+ badarg,
+ thrift_protocol:write(
+ Protocol,
+ {{struct, element(2, thrift1151_types:struct_info('StructC'))}, S2}
+ )
+ ).
-endif.