stryker4s icon indicating copy to clipboard operation
stryker4s copied to clipboard

Mutation failed

Open cbrunnkvist opened this issue 4 years ago • 1 comments

Summary

13:52:30.686 [pool-29-thread-1] WARN  stryker4s.mutants.applymutants.MatchBuilder - Failed to add mutation(s) 926 to new mutated code
13:52:30.688 [pool-29-thread-1] WARN  stryker4s.mutants.applymutants.MatchBuilder - The code that failed to mutate was: [
    e.rules
      .map { r =>
        s"""${r.cityRule
          .map(
            c => s"<li>City: ${c.cityId} (${c.cityName.getOrElse("Unknown")})</li>"
          )
          .getOrElse("")}
          ${r.areaRule
          .map(
            a => s"<li>Area: ${a.areaId} (${a.areaName.getOrElse("Unknown")})</li>"
          )
          .getOrElse("")}
       """
      }
      .getOrElse("")
] at Input.File(new File("..."), Charset.forName("UTF-8")):53:24

Stryker4s config

(nothing unusual)

Stryker4s environment

stryker4s 0.10.0-RC1

Your Environment

software version(s)
Scala version 2.12.8
Build tool & version 1.3.13
Operating System macOS 10.15.6

cbrunnkvist avatar Sep 25 '20 07:09 cbrunnkvist

Hi @cbrunnkvist! Thanks for creating this set of issues! They're super helpful in fixing bugs in the mutant-placing code! I've fixed the previous two unplaceable mutant issues, but this one seems to be a little more tricky. I won't work on this any time soon as I think the way to fix this would be a bigger rework of the mutant searching and replacing logic. At the very least after 0.10.0.

For future reference, a reproduceable smaller code example:

serviceProvider
  .request { _ => "foo" }
  .getOrElse("bar")

hugo-vrijswijk avatar Sep 28 '20 14:09 hugo-vrijswijk