Skip to content

Commit 0215fe7

Browse files
committed
Test test dependency
1 parent 5997943 commit 0215fe7

File tree

2 files changed

+37
-0
lines changed
  • sbt-dotty/sbt-test/sbt-dotty/quoted-example-project

2 files changed

+37
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
package hello
2+
3+
import org.junit.Test
4+
5+
// Import Expr and some extension methods
6+
import scala.quoted._
7+
8+
class Tests {
9+
10+
implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make(getClass.getClassLoader)
11+
12+
@Test def test(): Unit = {
13+
import hello.Main._
14+
15+
val square = stagedPower(2)
16+
17+
assert(Math.pow(3, 2) == square(3))
18+
19+
square(3)
20+
square(4)
21+
22+
assert(Math.pow(4, 2) == square(4))
23+
24+
val cube = stagedPower(3)
25+
cube(2)
26+
27+
28+
assert(Math.pow(2, 3) == cube(2))
29+
30+
31+
32+
val toTheFourth = stagedPower(4)
33+
assert(Math.pow(3, 4) == toTheFourth(3))
34+
}
35+
36+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
> run
2+
> test

0 commit comments

Comments
 (0)