diff --git a/include/hamcrest_internal.hrl b/include/hamcrest_internal.hrl index 46df5bc..dfd4ef7 100644 --- a/include/hamcrest_internal.hrl +++ b/include/hamcrest_internal.hrl @@ -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()), diff --git a/rebar.config b/rebar.config index adeb36c..e315e26 100644 --- a/rebar.config +++ b/rebar.config @@ -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"}. diff --git a/test.config b/test.config index f206e37..573703c 100644 --- a/test.config +++ b/test.config @@ -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}. diff --git a/test/hamcrest_transform_SUITE.erl b/test/hamcrest_transform_SUITE.erl index 5db0627..aa490e7 100644 --- a/test/hamcrest_transform_SUITE.erl +++ b/test/hamcrest_transform_SUITE.erl @@ -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. diff --git a/test/test.hrl b/test/test.hrl index 80c1291..30ae6ff 100644 --- a/test/test.hrl +++ b/test/test.hrl @@ -56,7 +56,7 @@ {unexpected_success, __V}]}) catch Class:Term -> ok; - __C:__T -> + __C:__T:StackTrace -> erlang:error({assertException_failed, [{module, ?MODULE}, {line, ?LINE}, @@ -65,8 +65,7 @@ "{ "++(??Class)++" , "++(??Term) ++" , [...] }"}, {unexpected_exception, - {__C, __T, - erlang:get_stacktrace()}}]}) + {__C, __T, StackTrace}}]}) end end)())).