Sha256: 179ce10bc3fad77dc1e14e271ba9bc8f15748b04b695ac61b8206d965dae9b47

Contents?: true

Size: 911 Bytes

Versions: 68

Compression:

Stored size: 911 Bytes

Contents

import testgen._
import TestSuiteBuilder._
import java.io.File

object PangramsTestGenerator {
  def main(args: Array[String]): Unit = {
    val file = new File("src/main/resources/pangram.json")
    def fromLabeledTestFromInput(argNames: String*): ToTestCaseData =
      withLabeledTest { sut =>
        labeledTest =>
          val args = sutArgsFromInput(labeledTest.result, argNames: _*)
          val isPangram = labeledTest.property.mkString
          val sutCall =
            s"""Pangrams.$isPangram($args)"""
          val expected =
            labeledTest.expected.fold(Function.const("true"), x => s"$x")
          TestCaseData(labeledTest.description, sutCall, expected)
      }

    val code = TestSuiteBuilder.build(file, fromLabeledTestFromInput("sentence"))
    println(s"‐‐‐‐‐‐‐‐‐‐‐‐‐")
    println(code)
    println(s"‐‐‐‐‐‐‐‐‐‐‐‐‐")
  }
}

Version data entries

68 entries across 68 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/scala/testgen/src/main/scala/PangramsTestGenerator.scala
trackler-2.2.1.179 tracks/scala/testgen/src/main/scala/PangramsTestGenerator.scala
trackler-2.2.1.178 tracks/scala/testgen/src/main/scala/PangramsTestGenerator.scala
trackler-2.2.1.177 tracks/scala/testgen/src/main/scala/PangramsTestGenerator.scala
trackler-2.2.1.176 tracks/scala/testgen/src/main/scala/PangramsTestGenerator.scala
trackler-2.2.1.175 tracks/scala/testgen/src/main/scala/PangramsTestGenerator.scala
trackler-2.2.1.174 tracks/scala/testgen/src/main/scala/PangramsTestGenerator.scala
trackler-2.2.1.173 tracks/scala/testgen/src/main/scala/PangramsTestGenerator.scala
trackler-2.2.1.172 tracks/scala/testgen/src/main/scala/PangramsTestGenerator.scala
trackler-2.2.1.171 tracks/scala/testgen/src/main/scala/PangramsTestGenerator.scala
trackler-2.2.1.170 tracks/scala/testgen/src/main/scala/PangramsTestGenerator.scala
trackler-2.2.1.169 tracks/scala/testgen/src/main/scala/PangramsTestGenerator.scala
trackler-2.2.1.167 tracks/scala/testgen/src/main/scala/PangramsTestGenerator.scala
trackler-2.2.1.166 tracks/scala/testgen/src/main/scala/PangramsTestGenerator.scala
trackler-2.2.1.165 tracks/scala/testgen/src/main/scala/PangramsTestGenerator.scala
trackler-2.2.1.164 tracks/scala/testgen/src/main/scala/PangramsTestGenerator.scala
trackler-2.2.1.163 tracks/scala/testgen/src/main/scala/PangramsTestGenerator.scala
trackler-2.2.1.162 tracks/scala/testgen/src/main/scala/PangramsTestGenerator.scala
trackler-2.2.1.161 tracks/scala/testgen/src/main/scala/PangramsTestGenerator.scala
trackler-2.2.1.160 tracks/scala/testgen/src/main/scala/PangramsTestGenerator.scala