• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

scoverage / sbt-scoverage-samples / #47

pending completion
#47

push

Roland Tritsch
Add sys.props to configure plugin versions (to support sbt-test ...

96 of 126 relevant lines covered (76.19%)

0.76 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

90.0
/src/main/scala/org/scoverage/samples/InstrumentLoader.scala
1
package org.scoverage.samples
2

3
import scala.util.Random
4
import java.util.Date
5
import org.apache.commons.io.IOUtils
6
import scala.jdk.CollectionConverters._
7

8
object InstrumentLoader {
9

10
  // this is here just to show the single line per statement colouring
11
  val beautifulTopLevelVal =
×
12
    if (System.currentTimeMillis() > 0) "hello" else "goodbye"
13

14
  // testing new statements
1✔
15
  val loadTime = new Date()
16

1✔
17
  def randomInstrument: Instrument = Random.shuffle(instruments).head
18

19
  lazy val instruments = {
20
    IOUtils
1✔
21
      .readLines(
1✔
22
        getClass.getResourceAsStream("/org/scoverage/dow.csv"),
23
        "UTF-8"
24
      )
1✔
25
      .asScala
1✔
26
      .map(line => {
1✔
27
        val tokens = line.split(',')
1✔
28
        Instrument(tokens(0).trim, tokens(1).trim)
29
      })
1✔
30
      .toSet
31
  }
32
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc