From 8b4b657196933a3cf95bcef8d97a42b8ef695448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C5=A0pan=C4=9Bl?= Date: Wed, 15 Mar 2023 10:41:38 +0100 Subject: [PATCH] Initial version - no effects yet --- .gitignore | 4 ++++ build.sbt | 12 ++++++++++++ project/build.properties | 1 + src/main/scala/Main.scala | 5 +++++ src/test/scala/MainTest.scala | 14 ++++++++++++++ 5 files changed, 36 insertions(+) create mode 100644 .gitignore create mode 100644 build.sbt create mode 100644 project/build.properties create mode 100644 src/main/scala/Main.scala create mode 100644 src/test/scala/MainTest.scala diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..063594d --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/target/ +/project/target/ +/.idea/ +/.bsp/ diff --git a/build.sbt b/build.sbt new file mode 100644 index 0000000..2e667ad --- /dev/null +++ b/build.sbt @@ -0,0 +1,12 @@ +ThisBuild / version := "0.1.0-SNAPSHOT" + +ThisBuild / scalaVersion := "2.13.10" + +lazy val root = (project in file(".")) + .settings( + name := "ScalaTestCheck", + libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.11" % Test, + libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.16.0" % Test, + libraryDependencies += "org.typelevel" %% "scalacheck-effect" % "1.0.4" % Test, + libraryDependencies += "org.scalatestplus" %% "scalacheck-1-15" % "3.2.11.0" % Test, + ) diff --git a/project/build.properties b/project/build.properties new file mode 100644 index 0000000..f344c14 --- /dev/null +++ b/project/build.properties @@ -0,0 +1 @@ +sbt.version = 1.8.2 diff --git a/src/main/scala/Main.scala b/src/main/scala/Main.scala new file mode 100644 index 0000000..6650aa2 --- /dev/null +++ b/src/main/scala/Main.scala @@ -0,0 +1,5 @@ +object Main { + def main(args: Array[String]): Unit = { + println("Hello world!") + } +} \ No newline at end of file diff --git a/src/test/scala/MainTest.scala b/src/test/scala/MainTest.scala new file mode 100644 index 0000000..2f62bdc --- /dev/null +++ b/src/test/scala/MainTest.scala @@ -0,0 +1,14 @@ +import org.scalatest.flatspec.AsyncFlatSpec +import org.scalatest.matchers.should.Matchers +import org.scalacheck._ +import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks + +class MainTest extends AsyncFlatSpec with Matchers with ScalaCheckPropertyChecks { + behavior of "Main" + + it should "perform computations" in { + forAll(Gen.oneOf(0 until 10)) { i => + assert(i < 5) // intentional fail - we want to see how the failure is reported + } + } +}