Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions include/hamcrest_internal.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,8 @@
%% @copyright 2010 Tim Watson.
%% -----------------------------------------------------------------------------

-ifdef(namespaced_types).
-type hc_set() :: sets:set().
-type hc_gb_set() :: gb_sets:set().
-else.
-type hc_set() :: set().
-type hc_gb_set() :: gb_set().
-endif.
-type hc_set() :: sets:set().
-type hc_gb_set() :: gb_sets:set().

-record('hamcrest.matchspec', {
matcher = undefined :: fun((term()) -> boolean()),
Expand Down
2 changes: 1 addition & 1 deletion rebar.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

{lib_dirs, ["deps"]}.
{erl_opts, [debug_info, fail_on_warning, {platform_define, "^[0-9]+", namespaced_types}]}.
{erl_opts, [debug_info, fail_on_warning]}.
{clean_files, ["logs", "build", "include/hamcrest.hrl"]}.

{plugin_dir, "priv/build/plugins"}.
Expand Down
3 changes: 1 addition & 2 deletions test.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
{erl_opts, [
debug_info,
fail_on_warning,
{src_dirs, ["test"]},
{platform_define, "^[0-9]+", namespaced_types}
{src_dirs, ["test"]}
]}.

{validate_app_modules, false}.
Expand Down
4 changes: 2 additions & 2 deletions test/hamcrest_transform_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ test_failed_assert(_Config) ->
true ->
error_expected
catch
error:{assertion_failed, _AssertionDetails} ->
[{?MODULE, _Function, _Arity, _FileLine} | _] = erlang:get_stacktrace(),
error:{assertion_failed, _AssertionDetails}:StackTrace ->
[{?MODULE, _Function, _Arity, _FileLine} | _] = StackTrace,
true
end,
ok.
Expand Down
5 changes: 2 additions & 3 deletions test/test.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
{unexpected_success, __V}]})
catch
Class:Term -> ok;
__C:__T ->
__C:__T:StackTrace ->
erlang:error({assertException_failed,
[{module, ?MODULE},
{line, ?LINE},
Expand All @@ -65,8 +65,7 @@
"{ "++(??Class)++" , "++(??Term)
++" , [...] }"},
{unexpected_exception,
{__C, __T,
erlang:get_stacktrace()}}]})
{__C, __T, StackTrace}}]})
end
end)())).

Expand Down