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

scoverage / sbt-scoverage-samples / 4741723636

19 Apr 2023 09:30AM CUT coverage: 66.912% (-5.6%) from 72.477%
4741723636

push

Roland Tritsch
Even more time to shut down.

91 of 136 relevant lines covered (66.91%)

0.65 hits per line

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

70.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 =
1✔
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
×
21
      .readLines(
×
22
        getClass.getResourceAsStream("/org/scoverage/dow.csv"),
23
        "UTF-8"
24
      )
×
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