diff options
author | Li Haoyi <haoyi.sg@gmail.com> | 2018-04-08 15:46:22 -0700 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2018-04-08 15:46:22 -0700 |
commit | d94bb5eae6cd5f75d3cac1b69518b80c0a90169b (patch) | |
tree | c21749c35fdc5b193ad16c6ea9c01ac4c1da2cc9 /scalalib/test/resources | |
parent | bcdb1aaf941a00a52fc854a5fbced81b2fda96d9 (diff) | |
download | mill-d94bb5eae6cd5f75d3cac1b69518b80c0a90169b.tar.gz mill-d94bb5eae6cd5f75d3cac1b69518b80c0a90169b.tar.bz2 mill-d94bb5eae6cd5f75d3cac1b69518b80c0a90169b.zip |
Properly support test frameworks which spawn child tasks
Needed to fix https://github.com/lihaoyi/mill/issues/286
Diffstat (limited to 'scalalib/test/resources')
-rw-r--r-- | scalalib/test/resources/hello-scalacheck/foo/src/Main.scala | 3 | ||||
-rw-r--r-- | scalalib/test/resources/hello-scalacheck/foo/test/src/MainProps.scala | 21 |
2 files changed, 24 insertions, 0 deletions
diff --git a/scalalib/test/resources/hello-scalacheck/foo/src/Main.scala b/scalalib/test/resources/hello-scalacheck/foo/src/Main.scala new file mode 100644 index 00000000..c98908d3 --- /dev/null +++ b/scalalib/test/resources/hello-scalacheck/foo/src/Main.scala @@ -0,0 +1,3 @@ +object Main extends App { + println("Hello world!") +}
\ No newline at end of file diff --git a/scalalib/test/resources/hello-scalacheck/foo/test/src/MainProps.scala b/scalalib/test/resources/hello-scalacheck/foo/test/src/MainProps.scala new file mode 100644 index 00000000..e405a965 --- /dev/null +++ b/scalalib/test/resources/hello-scalacheck/foo/test/src/MainProps.scala @@ -0,0 +1,21 @@ +import org.scalacheck._ + +object MainProps extends Properties("String") { + import Prop.forAll + + property("startsWith") = forAll { (a: String, b: String) => + (a+b).startsWith(a) + } + + property("endsWith") = forAll { (a: String, b: String) => + (a+b).endsWith(b) + } + + property("substring") = forAll { (a: String, b: String) => + (a+b).substring(a.length) == b + } + + property("substring") = forAll { (a: String, b: String, c: String) => + (a+b+c).substring(a.length, a.length+b.length) == b + } +}
\ No newline at end of file |