Uncommenting tx_invalid.json test cases

This commit is contained in:
Chris Stewart 2018-03-13 10:57:42 -05:00
parent b88acaab94
commit 79f92a4802

View File

@ -171,11 +171,11 @@ class TransactionTest extends FlatSpec with MustMatchers {
val source = Source.fromURL(getClass.getResource("/tx_invalid.json"))
//use this to represent a single test case from script_valid.json
val lines =
/* val lines =
"""
|[[[["0000000000000000000000000000000000000000000000000000000000000000",-1,"1"]], "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0151ffffffff010000000000000000015100000000", "P2SH"]]
""".stripMargin
//val lines = try source.getLines.filterNot(_.isEmpty).map(_.trim) mkString "\n" finally source.close()
""".stripMargin*/
val lines = try source.getLines.filterNot(_.isEmpty).map(_.trim) mkString "\n" finally source.close()
val json = lines.parseJson
val testCasesOpt : Seq[Option[CoreTransactionTestCase]] = json.convertTo[Seq[Option[CoreTransactionTestCase]]]
val testCases : Seq[CoreTransactionTestCase] = testCasesOpt.flatten