Sha256: baeec4f5ed13c21c9f6abc8d678709acdf040fb21b89f3f6e338000f9e056606
Contents?: true
Size: 1.03 KB
Versions: 68
Compression:
Stored size: 1.03 KB
Contents
import java.io.File import testgen.TestSuiteBuilder._ import testgen._ object RnaTranscriptionTestGenerator { def main(args: Array[String]): Unit = { val file = new File("src/main/resources/rna-transcription.json") def toString(expected: CanonicalDataParser.Expected): String = { expected match { case Left(_) => "None" case Right(null) => "None" case Right(n) => s"""Some(\"$n\")""" } } def fromLabeledTestFromInput(argNames: String*): ToTestCaseData = withLabeledTest { sut => labeledTest => val args = sutArgsFromInput(labeledTest.result, argNames: _*) val property = labeledTest.property val sutCall = s"""RnaTranscription.$property($args)""" val expected = toString(labeledTest.expected) TestCaseData(labeledTest.description, sutCall, expected) } val code = TestSuiteBuilder.build(file, fromLabeledTestFromInput("dna")) println(s"-------------") println(code) println(s"-------------") } }
Version data entries
68 entries across 68 versions & 1 rubygems