You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had a problem on elixir where some lines of my code was reported as uncovered also if tests correctly cover them. I was able to reproduce the problem also with plain Erlang code so I'm opening the bug here.
After running that test the second clause of the function is wrongly reported as uncovered. As better explained in the linked Elixir issue almost every change to the code makes the cover report correct again.
Affected versions
This happens with OTP 27.1, I've tried also with OTP 26.2.5 and in that case the behaviour is correct.
The text was updated successfully, but these errors were encountered:
I'm also hitting this in Elixir running on Erlang 27. (Works as expected on Erlang 26).
defmodule Neg do
def hello("Prefix." <> name) do
dbg("Find called with prefix")
name
end
def hello(name) do
dbg("Find called without prefix")
"Hello" <> name
end
end
defmodule NegTest do
use ExUnit.Case
test "code covers all lines" do
assert Neg.hello("Prefix.Alex") == "Alex"
assert Neg.hello("Alex") == "Hello Alex"
end
end
This is a follow up of elixir-lang/elixir#13863.
I had a problem on elixir where some lines of my code was reported as uncovered also if tests correctly cover them. I was able to reproduce the problem also with plain Erlang code so I'm opening the bug here.
This the module under test
and this is the test
After running that test the second clause of the function is wrongly reported as uncovered. As better explained in the linked Elixir issue almost every change to the code makes the cover report correct again.
Affected versions
This happens with OTP 27.1, I've tried also with OTP 26.2.5 and in that case the behaviour is correct.
The text was updated successfully, but these errors were encountered: