mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2024-11-20 02:11:40 +01:00
Uncommenting tx_invalid.json test cases
This commit is contained in:
parent
b88acaab94
commit
79f92a4802
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user