Skip to content

Commit

Permalink
THRIFT-2951 Fix Erlang name conflict test
Browse files Browse the repository at this point in the history
Patch: Nobuaki Sukegawa

    This closes apache#360

----
commit 06cc3e9
Author: Nobuaki Sukegawa <[email protected]>
Date:   2015-01-27T18:11:40Z

    THRIFT-2951 Fix Erlang name conflict test

----
  • Loading branch information
henrique committed Feb 5, 2015
1 parent a727007 commit 2f34da7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions test/NameConflictTest.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
12 changes: 9 additions & 3 deletions test/erl/src/name_conflict_test.erl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ record_generation_test_() ->
#get{sbyte=null}
)},
{"partial record", ?_assertMatch(
{partial, _},
{partial, _, _, _},
#partial{using=null}
)},
{"ClassAndProp record", ?_assertMatch(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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)
)},
Expand Down

0 comments on commit 2f34da7

Please sign in to comment.