Skip to content

Instantly share code, notes, and snippets.

View DarrenBishop's full-sized avatar
🧐

Darren Bishop DarrenBishop

🧐
View GitHub Profile
@dwickern
dwickern / Repeated.scala
Created February 16, 2017 18:33
Scalatest: run each test N times using a command-line argument
import org.scalatest._
sealed trait Repeated extends TestSuiteMixin { this: TestSuite =>
protected abstract override def runTest(testName: String, args: Args): Status = {
def run0(times: Int): Status = {
val status = super.runTest(testName, args)
if (times <= 1) status else status.thenRun(run0(times - 1))
}
run0(args.configMap.getWithDefault("times", "1").toInt)
@johan
johan / laughing-man.svg
Created July 6, 2011 04:56
The Laughing Man (Ghost in the Shell), 1000 byte SVG :-)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.