Code not shown as covered
Closed this issue · 1 comments
larshesel commented
Assume I have created a mix project 'covertest', the following module ./lib/covertest.ex:
defmodule Covertest do
def x(1), do: 2
def x(:z), do: 45
def y(45), do: 34
end
and the following test file ./lib/covertest_test.exs:
defmodule CovertestTest do
use ExUnit.Case
test "covertest" do
assert Covertest.x(1) == 2
assert Covertest.x(:z) == 45
end
end
Then running mix test --cover
generates a report where all the lines are marked as class irrelevant in the html. I would have expected two to be marked as covered and one as not covered.
I haven't figured out where the problem is yet. I'm running Elixir 1.0.3.
larshesel commented
So it seems running without coverex, the generated coverage is also wrong, so it's prob. a bug in the underlying coverage generation code. I'll close this for now.