Skip to content

Commit

Permalink
Handle new OTP 27 compile options
Browse files Browse the repository at this point in the history
In OTP 27.0-RC.1, the option 'force_line_counters' showed up when
getting compile options for an already compiled module. Instead of
verifying the exact list, we now loiok at 'i' and 'd' only since they
are what supposedly matter for this test.
  • Loading branch information
eproxus committed Feb 15, 2024
1 parent 64034a2 commit aa278c1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/meck_tests.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1128,10 +1128,9 @@ cover_options_fail_({_OldPath, Src, Module}) ->
proplists:delete(outdir, lists:sort(meck_code:compile_options(Module)))
),
{ok, _} = cover:compile_beam(Module),
?assertEqual(
[{i, test_include()}, {d, 'TEST', true}],
meck_code:compile_options(Module)
),
ActualCompileOpts = meck_code:compile_options(Module),
?assertEqual({i, test_include()}, lists:keyfind(i, 1, ActualCompileOpts)),
?assertEqual({d, 'TEST', true}, lists:keyfind(d, 1, ActualCompileOpts)),
a = Module:a(),
b = Module:b(),
{1, 2} = Module:c(1, 2),
Expand Down

0 comments on commit aa278c1

Please sign in to comment.