-
-
Notifications
You must be signed in to change notification settings - Fork 231
FAQ & Gotchas
mitchellwrosen edited this page Dec 3, 2014
·
3 revisions
See #59. Are you mocking a NIF? This error message comes from erlang:load_nif/2. A simple workaround is to rewrite
foo() ->
some_nif:some_func().
as
foo() ->
?MODULE:some_nif_some_func().
some_nif_some_func() ->
some_nif:some_func().
Note the ?MODULE:
above...
See #120. The Erlang compiler generates a local function jump when compiling local functions. You must fully qualify the function call. For example, if you wish to mock bar
, Rewrite
foo() ->
bar().
as
foo() ->
?MODULE:bar().
See #14. Your module must be compiled with +debug_info
.