Skip to content

Commit ee75030

Browse files
committed
Add debug tests
1 parent d3d26e7 commit ee75030

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

core/src/test/scala/ox/UtilTest.scala

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package ox
33
import org.scalatest.flatspec.AnyFlatSpec
44
import org.scalatest.matchers.should.Matchers
55
import ox.util.Trail
6+
import ox.*
67

78
class UtilTest extends AnyFlatSpec with Matchers:
89
"discard" should "do nothing" in {
@@ -60,4 +61,14 @@ class UtilTest extends AnyFlatSpec with Matchers:
6061
}.tap(v => t.add(s"Got: $v")) shouldBe 3
6162
t.get shouldBe Vector("Adding", "Got: 3")
6263
}
64+
65+
"debug as extension" should "work" in {
66+
val x = 10
67+
x.debug("some label") shouldBe 10
68+
}
69+
70+
"debug as top-level method" should "work" in {
71+
val x = 10
72+
debug(x + 1) shouldBe ()
73+
}
6374
end UtilTest

0 commit comments

Comments
 (0)