Skip to content

Commit

Permalink
LSV6 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kushti committed Oct 22, 2024
1 parent ceff4b2 commit 5f6b9ee
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions sc/shared/src/test/scala/sigma/LanguageSpecificationV6.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1799,4 +1799,30 @@ class LanguageSpecificationV6 extends LanguageSpecificationBase { suite =>
)
}

property("Global.some") {
lazy val some = newFeature(
{ (x: Byte) => CSigmaDslBuilder.some[Byte](x) },
"{ (x: Byte) => Global.some[Byte](x) }",
sinceVersion = V6SoftForkVersion)
val cases = Seq(
(0.toByte, Success(Some(0.toByte))),
(1.toByte, Success(Some(1.toByte)))
)

testCases(cases, some)
}

property("Global.none") {
lazy val some = newFeature(
{ (x: Byte) => CSigmaDslBuilder.none[Byte]() },
"{ (x: Byte) => Global.none[Byte]() }",
sinceVersion = V6SoftForkVersion)
val cases = Seq(
(0.toByte, Success(None)),
(1.toByte, Success(None))
)

testCases(cases, some)
}

}

0 comments on commit 5f6b9ee

Please sign in to comment.