Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

anonymous function argument to constructor omitted #327

Open
ChrisL opened this issue Jun 2, 2017 · 0 comments
Open

anonymous function argument to constructor omitted #327

ChrisL opened this issue Jun 2, 2017 · 0 comments

Comments

@ChrisL
Copy link

ChrisL commented Jun 2, 2017

In the following, scoverage (V1.3.3) fails to check whether line
str ⇒ str.size
is covered. In particular in cases where str.size is a more complex construct, I'd love to see this checked, too.

abstract class CoverageFailureBase[T](valueGenerator: String ⇒ T){
  def eval(arg: String) =
    valueGenerator(arg)
}

case class CoverageFailure() extends CoverageFailureBase[Int](
  str ⇒ str.size
)

Here comes the test code:

import org.scalatest.FunSuite

class CoverageFailureTest extends FunSuite {
  test("VariableFindCycles") {
    CoverageFailure().eval("myString")
  }
}

This is the test report:
grafik

@ckipp01 ckipp01 transferred this issue from scoverage/sbt-scoverage May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant