diff --git a/sbt-test/unroll-annot/caseclass/build.sbt b/sbt-test/unroll-annot/caseclass/build.sbt deleted file mode 100644 index fc692a0473a6..000000000000 --- a/sbt-test/unroll-annot/caseclass/build.sbt +++ /dev/null @@ -1,56 +0,0 @@ -lazy val utils = project.in(file("utils")) - -lazy val sharedSettings = Seq( - scalacOptions ++= Seq("-Ycheck:all", "-experimental") -) - -lazy val v1 = project.in(file("v1")) - .settings(sharedSettings) - -lazy val v1_app = project.in(file("v1_app")).dependsOn(utils) - .settings(sharedSettings) - .settings( - fork := true, - Runtime / unmanagedClasspath := Seq( - Attributed.blank((v1 / Runtime / classDirectory).value) - ), - Compile / unmanagedClasspath := Seq( - Attributed.blank((v1 / Compile / classDirectory).value) - ), - ) - -lazy val v2 = project.in(file("v2")) - .settings(sharedSettings) - -lazy val v2_app = project.in(file("v2_app")).dependsOn(utils) - .settings(sharedSettings) - .settings( - fork := true, - Runtime / unmanagedClasspath := Seq( - // add v1_app, compiled against v1, to the classpath - Attributed.blank((v1_app / Runtime / classDirectory).value), - Attributed.blank((v2 / Runtime / classDirectory).value) - ), - Compile / unmanagedClasspath := Seq( - Attributed.blank((v2 / Compile / classDirectory).value) - ), - ) - -lazy val v3 = project.in(file("v3")) - .settings(sharedSettings) - -lazy val v3_app = project.in(file("v3_app")).dependsOn(utils) - .settings(sharedSettings) - .settings( - fork := true, - Runtime / unmanagedClasspath := Seq( - // add v1_app, compiled against v1, to the classpath - Attributed.blank((v1_app / Runtime / classDirectory).value), - // add v2_app, compiled against v2, to the classpath - Attributed.blank((v2_app / Runtime / classDirectory).value), - Attributed.blank((v3 / Runtime / classDirectory).value) - ), - Compile / unmanagedClasspath := Seq( - Attributed.blank((v3 / Compile / classDirectory).value) - ), - ) diff --git a/sbt-test/unroll-annot/caseclass/project/DottyInjectedPlugin.scala b/sbt-test/unroll-annot/caseclass/project/DottyInjectedPlugin.scala deleted file mode 100644 index 69f15d168bfc..000000000000 --- a/sbt-test/unroll-annot/caseclass/project/DottyInjectedPlugin.scala +++ /dev/null @@ -1,12 +0,0 @@ -import sbt._ -import Keys._ - -object DottyInjectedPlugin extends AutoPlugin { - override def requires = plugins.JvmPlugin - override def trigger = allRequirements - - override val projectSettings = Seq( - scalaVersion := sys.props("plugin.scalaVersion"), - scalacOptions += "-source:3.0-migration" - ) -} diff --git a/sbt-test/unroll-annot/caseclass/test b/sbt-test/unroll-annot/caseclass/test deleted file mode 100644 index e8e500857b0e..000000000000 --- a/sbt-test/unroll-annot/caseclass/test +++ /dev/null @@ -1,14 +0,0 @@ -# compile and run a basic version of Unrolled (v1), and an app that uses it -> v1/compile -> v1_app/runMain unroll.UnrollTestMainV1 -# add a field to the case class (v2), and update the app to use it, -# and ensure the old version (v1) still links -> v2/compile -> v2_app/runMain unroll.UnrollTestMainV1 -> v2_app/runMain unroll.UnrollTestMainV2 -# add a field to the case class (v3), and update the app to use it, -# and ensure the old versions (v1, v2) still link -> v3/compile -> v3_app/runMain unroll.UnrollTestMainV1 -> v3_app/runMain unroll.UnrollTestMainV2 -> v3_app/runMain unroll.UnrollTestMainV3 diff --git a/sbt-test/unroll-annot/classMethod/build.sbt b/sbt-test/unroll-annot/classMethod/build.sbt deleted file mode 100644 index fc692a0473a6..000000000000 --- a/sbt-test/unroll-annot/classMethod/build.sbt +++ /dev/null @@ -1,56 +0,0 @@ -lazy val utils = project.in(file("utils")) - -lazy val sharedSettings = Seq( - scalacOptions ++= Seq("-Ycheck:all", "-experimental") -) - -lazy val v1 = project.in(file("v1")) - .settings(sharedSettings) - -lazy val v1_app = project.in(file("v1_app")).dependsOn(utils) - .settings(sharedSettings) - .settings( - fork := true, - Runtime / unmanagedClasspath := Seq( - Attributed.blank((v1 / Runtime / classDirectory).value) - ), - Compile / unmanagedClasspath := Seq( - Attributed.blank((v1 / Compile / classDirectory).value) - ), - ) - -lazy val v2 = project.in(file("v2")) - .settings(sharedSettings) - -lazy val v2_app = project.in(file("v2_app")).dependsOn(utils) - .settings(sharedSettings) - .settings( - fork := true, - Runtime / unmanagedClasspath := Seq( - // add v1_app, compiled against v1, to the classpath - Attributed.blank((v1_app / Runtime / classDirectory).value), - Attributed.blank((v2 / Runtime / classDirectory).value) - ), - Compile / unmanagedClasspath := Seq( - Attributed.blank((v2 / Compile / classDirectory).value) - ), - ) - -lazy val v3 = project.in(file("v3")) - .settings(sharedSettings) - -lazy val v3_app = project.in(file("v3_app")).dependsOn(utils) - .settings(sharedSettings) - .settings( - fork := true, - Runtime / unmanagedClasspath := Seq( - // add v1_app, compiled against v1, to the classpath - Attributed.blank((v1_app / Runtime / classDirectory).value), - // add v2_app, compiled against v2, to the classpath - Attributed.blank((v2_app / Runtime / classDirectory).value), - Attributed.blank((v3 / Runtime / classDirectory).value) - ), - Compile / unmanagedClasspath := Seq( - Attributed.blank((v3 / Compile / classDirectory).value) - ), - ) diff --git a/sbt-test/unroll-annot/classMethod/project/DottyInjectedPlugin.scala b/sbt-test/unroll-annot/classMethod/project/DottyInjectedPlugin.scala deleted file mode 100644 index 69f15d168bfc..000000000000 --- a/sbt-test/unroll-annot/classMethod/project/DottyInjectedPlugin.scala +++ /dev/null @@ -1,12 +0,0 @@ -import sbt._ -import Keys._ - -object DottyInjectedPlugin extends AutoPlugin { - override def requires = plugins.JvmPlugin - override def trigger = allRequirements - - override val projectSettings = Seq( - scalaVersion := sys.props("plugin.scalaVersion"), - scalacOptions += "-source:3.0-migration" - ) -} diff --git a/sbt-test/unroll-annot/classMethod/test b/sbt-test/unroll-annot/classMethod/test deleted file mode 100644 index e8e500857b0e..000000000000 --- a/sbt-test/unroll-annot/classMethod/test +++ /dev/null @@ -1,14 +0,0 @@ -# compile and run a basic version of Unrolled (v1), and an app that uses it -> v1/compile -> v1_app/runMain unroll.UnrollTestMainV1 -# add a field to the case class (v2), and update the app to use it, -# and ensure the old version (v1) still links -> v2/compile -> v2_app/runMain unroll.UnrollTestMainV1 -> v2_app/runMain unroll.UnrollTestMainV2 -# add a field to the case class (v3), and update the app to use it, -# and ensure the old versions (v1, v2) still link -> v3/compile -> v3_app/runMain unroll.UnrollTestMainV1 -> v3_app/runMain unroll.UnrollTestMainV2 -> v3_app/runMain unroll.UnrollTestMainV3 diff --git a/sbt-test/unroll-annot/curriedMethod/build.sbt b/sbt-test/unroll-annot/curriedMethod/build.sbt deleted file mode 100644 index fc692a0473a6..000000000000 --- a/sbt-test/unroll-annot/curriedMethod/build.sbt +++ /dev/null @@ -1,56 +0,0 @@ -lazy val utils = project.in(file("utils")) - -lazy val sharedSettings = Seq( - scalacOptions ++= Seq("-Ycheck:all", "-experimental") -) - -lazy val v1 = project.in(file("v1")) - .settings(sharedSettings) - -lazy val v1_app = project.in(file("v1_app")).dependsOn(utils) - .settings(sharedSettings) - .settings( - fork := true, - Runtime / unmanagedClasspath := Seq( - Attributed.blank((v1 / Runtime / classDirectory).value) - ), - Compile / unmanagedClasspath := Seq( - Attributed.blank((v1 / Compile / classDirectory).value) - ), - ) - -lazy val v2 = project.in(file("v2")) - .settings(sharedSettings) - -lazy val v2_app = project.in(file("v2_app")).dependsOn(utils) - .settings(sharedSettings) - .settings( - fork := true, - Runtime / unmanagedClasspath := Seq( - // add v1_app, compiled against v1, to the classpath - Attributed.blank((v1_app / Runtime / classDirectory).value), - Attributed.blank((v2 / Runtime / classDirectory).value) - ), - Compile / unmanagedClasspath := Seq( - Attributed.blank((v2 / Compile / classDirectory).value) - ), - ) - -lazy val v3 = project.in(file("v3")) - .settings(sharedSettings) - -lazy val v3_app = project.in(file("v3_app")).dependsOn(utils) - .settings(sharedSettings) - .settings( - fork := true, - Runtime / unmanagedClasspath := Seq( - // add v1_app, compiled against v1, to the classpath - Attributed.blank((v1_app / Runtime / classDirectory).value), - // add v2_app, compiled against v2, to the classpath - Attributed.blank((v2_app / Runtime / classDirectory).value), - Attributed.blank((v3 / Runtime / classDirectory).value) - ), - Compile / unmanagedClasspath := Seq( - Attributed.blank((v3 / Compile / classDirectory).value) - ), - ) diff --git a/sbt-test/unroll-annot/curriedMethod/project/DottyInjectedPlugin.scala b/sbt-test/unroll-annot/curriedMethod/project/DottyInjectedPlugin.scala deleted file mode 100644 index 69f15d168bfc..000000000000 --- a/sbt-test/unroll-annot/curriedMethod/project/DottyInjectedPlugin.scala +++ /dev/null @@ -1,12 +0,0 @@ -import sbt._ -import Keys._ - -object DottyInjectedPlugin extends AutoPlugin { - override def requires = plugins.JvmPlugin - override def trigger = allRequirements - - override val projectSettings = Seq( - scalaVersion := sys.props("plugin.scalaVersion"), - scalacOptions += "-source:3.0-migration" - ) -} diff --git a/sbt-test/unroll-annot/curriedMethod/test b/sbt-test/unroll-annot/curriedMethod/test deleted file mode 100644 index e8e500857b0e..000000000000 --- a/sbt-test/unroll-annot/curriedMethod/test +++ /dev/null @@ -1,14 +0,0 @@ -# compile and run a basic version of Unrolled (v1), and an app that uses it -> v1/compile -> v1_app/runMain unroll.UnrollTestMainV1 -# add a field to the case class (v2), and update the app to use it, -# and ensure the old version (v1) still links -> v2/compile -> v2_app/runMain unroll.UnrollTestMainV1 -> v2_app/runMain unroll.UnrollTestMainV2 -# add a field to the case class (v3), and update the app to use it, -# and ensure the old versions (v1, v2) still link -> v3/compile -> v3_app/runMain unroll.UnrollTestMainV1 -> v3_app/runMain unroll.UnrollTestMainV2 -> v3_app/runMain unroll.UnrollTestMainV3 diff --git a/sbt-test/unroll-annot/genericMethod/build.sbt b/sbt-test/unroll-annot/genericMethod/build.sbt deleted file mode 100644 index fc692a0473a6..000000000000 --- a/sbt-test/unroll-annot/genericMethod/build.sbt +++ /dev/null @@ -1,56 +0,0 @@ -lazy val utils = project.in(file("utils")) - -lazy val sharedSettings = Seq( - scalacOptions ++= Seq("-Ycheck:all", "-experimental") -) - -lazy val v1 = project.in(file("v1")) - .settings(sharedSettings) - -lazy val v1_app = project.in(file("v1_app")).dependsOn(utils) - .settings(sharedSettings) - .settings( - fork := true, - Runtime / unmanagedClasspath := Seq( - Attributed.blank((v1 / Runtime / classDirectory).value) - ), - Compile / unmanagedClasspath := Seq( - Attributed.blank((v1 / Compile / classDirectory).value) - ), - ) - -lazy val v2 = project.in(file("v2")) - .settings(sharedSettings) - -lazy val v2_app = project.in(file("v2_app")).dependsOn(utils) - .settings(sharedSettings) - .settings( - fork := true, - Runtime / unmanagedClasspath := Seq( - // add v1_app, compiled against v1, to the classpath - Attributed.blank((v1_app / Runtime / classDirectory).value), - Attributed.blank((v2 / Runtime / classDirectory).value) - ), - Compile / unmanagedClasspath := Seq( - Attributed.blank((v2 / Compile / classDirectory).value) - ), - ) - -lazy val v3 = project.in(file("v3")) - .settings(sharedSettings) - -lazy val v3_app = project.in(file("v3_app")).dependsOn(utils) - .settings(sharedSettings) - .settings( - fork := true, - Runtime / unmanagedClasspath := Seq( - // add v1_app, compiled against v1, to the classpath - Attributed.blank((v1_app / Runtime / classDirectory).value), - // add v2_app, compiled against v2, to the classpath - Attributed.blank((v2_app / Runtime / classDirectory).value), - Attributed.blank((v3 / Runtime / classDirectory).value) - ), - Compile / unmanagedClasspath := Seq( - Attributed.blank((v3 / Compile / classDirectory).value) - ), - ) diff --git a/sbt-test/unroll-annot/genericMethod/project/DottyInjectedPlugin.scala b/sbt-test/unroll-annot/genericMethod/project/DottyInjectedPlugin.scala deleted file mode 100644 index 69f15d168bfc..000000000000 --- a/sbt-test/unroll-annot/genericMethod/project/DottyInjectedPlugin.scala +++ /dev/null @@ -1,12 +0,0 @@ -import sbt._ -import Keys._ - -object DottyInjectedPlugin extends AutoPlugin { - override def requires = plugins.JvmPlugin - override def trigger = allRequirements - - override val projectSettings = Seq( - scalaVersion := sys.props("plugin.scalaVersion"), - scalacOptions += "-source:3.0-migration" - ) -} diff --git a/sbt-test/unroll-annot/genericMethod/test b/sbt-test/unroll-annot/genericMethod/test deleted file mode 100644 index e8e500857b0e..000000000000 --- a/sbt-test/unroll-annot/genericMethod/test +++ /dev/null @@ -1,14 +0,0 @@ -# compile and run a basic version of Unrolled (v1), and an app that uses it -> v1/compile -> v1_app/runMain unroll.UnrollTestMainV1 -# add a field to the case class (v2), and update the app to use it, -# and ensure the old version (v1) still links -> v2/compile -> v2_app/runMain unroll.UnrollTestMainV1 -> v2_app/runMain unroll.UnrollTestMainV2 -# add a field to the case class (v3), and update the app to use it, -# and ensure the old versions (v1, v2) still link -> v3/compile -> v3_app/runMain unroll.UnrollTestMainV1 -> v3_app/runMain unroll.UnrollTestMainV2 -> v3_app/runMain unroll.UnrollTestMainV3 diff --git a/sbt-test/unroll-annot/methodWithImplicit/build.sbt b/sbt-test/unroll-annot/methodWithImplicit/build.sbt deleted file mode 100644 index fc692a0473a6..000000000000 --- a/sbt-test/unroll-annot/methodWithImplicit/build.sbt +++ /dev/null @@ -1,56 +0,0 @@ -lazy val utils = project.in(file("utils")) - -lazy val sharedSettings = Seq( - scalacOptions ++= Seq("-Ycheck:all", "-experimental") -) - -lazy val v1 = project.in(file("v1")) - .settings(sharedSettings) - -lazy val v1_app = project.in(file("v1_app")).dependsOn(utils) - .settings(sharedSettings) - .settings( - fork := true, - Runtime / unmanagedClasspath := Seq( - Attributed.blank((v1 / Runtime / classDirectory).value) - ), - Compile / unmanagedClasspath := Seq( - Attributed.blank((v1 / Compile / classDirectory).value) - ), - ) - -lazy val v2 = project.in(file("v2")) - .settings(sharedSettings) - -lazy val v2_app = project.in(file("v2_app")).dependsOn(utils) - .settings(sharedSettings) - .settings( - fork := true, - Runtime / unmanagedClasspath := Seq( - // add v1_app, compiled against v1, to the classpath - Attributed.blank((v1_app / Runtime / classDirectory).value), - Attributed.blank((v2 / Runtime / classDirectory).value) - ), - Compile / unmanagedClasspath := Seq( - Attributed.blank((v2 / Compile / classDirectory).value) - ), - ) - -lazy val v3 = project.in(file("v3")) - .settings(sharedSettings) - -lazy val v3_app = project.in(file("v3_app")).dependsOn(utils) - .settings(sharedSettings) - .settings( - fork := true, - Runtime / unmanagedClasspath := Seq( - // add v1_app, compiled against v1, to the classpath - Attributed.blank((v1_app / Runtime / classDirectory).value), - // add v2_app, compiled against v2, to the classpath - Attributed.blank((v2_app / Runtime / classDirectory).value), - Attributed.blank((v3 / Runtime / classDirectory).value) - ), - Compile / unmanagedClasspath := Seq( - Attributed.blank((v3 / Compile / classDirectory).value) - ), - ) diff --git a/sbt-test/unroll-annot/methodWithImplicit/project/DottyInjectedPlugin.scala b/sbt-test/unroll-annot/methodWithImplicit/project/DottyInjectedPlugin.scala deleted file mode 100644 index 69f15d168bfc..000000000000 --- a/sbt-test/unroll-annot/methodWithImplicit/project/DottyInjectedPlugin.scala +++ /dev/null @@ -1,12 +0,0 @@ -import sbt._ -import Keys._ - -object DottyInjectedPlugin extends AutoPlugin { - override def requires = plugins.JvmPlugin - override def trigger = allRequirements - - override val projectSettings = Seq( - scalaVersion := sys.props("plugin.scalaVersion"), - scalacOptions += "-source:3.0-migration" - ) -} diff --git a/sbt-test/unroll-annot/methodWithImplicit/test b/sbt-test/unroll-annot/methodWithImplicit/test deleted file mode 100644 index e8e500857b0e..000000000000 --- a/sbt-test/unroll-annot/methodWithImplicit/test +++ /dev/null @@ -1,14 +0,0 @@ -# compile and run a basic version of Unrolled (v1), and an app that uses it -> v1/compile -> v1_app/runMain unroll.UnrollTestMainV1 -# add a field to the case class (v2), and update the app to use it, -# and ensure the old version (v1) still links -> v2/compile -> v2_app/runMain unroll.UnrollTestMainV1 -> v2_app/runMain unroll.UnrollTestMainV2 -# add a field to the case class (v3), and update the app to use it, -# and ensure the old versions (v1, v2) still link -> v3/compile -> v3_app/runMain unroll.UnrollTestMainV1 -> v3_app/runMain unroll.UnrollTestMainV2 -> v3_app/runMain unroll.UnrollTestMainV3 diff --git a/sbt-test/unroll-annot/methodWithImplicit/utils/src/main/scala/TestUtils.scala b/sbt-test/unroll-annot/methodWithImplicit/utils/src/main/scala/TestUtils.scala deleted file mode 100644 index 6ac413c9fe98..000000000000 --- a/sbt-test/unroll-annot/methodWithImplicit/utils/src/main/scala/TestUtils.scala +++ /dev/null @@ -1,12 +0,0 @@ -package unroll - -object TestUtils { - def logAssertStartsWith(actual: String, expected: String): Unit = { - assert(actual.startsWith(expected)) - val suffix = { - val suffix0 = actual.stripPrefix(expected) - if (suffix0.isEmpty) "" else s""" + "$suffix0"""" - } - println(s"""Assertion passed: found "$expected"$suffix""") - } -} diff --git a/sbt-test/unroll-annot/objectMethod/build.sbt b/sbt-test/unroll-annot/objectMethod/build.sbt deleted file mode 100644 index fc692a0473a6..000000000000 --- a/sbt-test/unroll-annot/objectMethod/build.sbt +++ /dev/null @@ -1,56 +0,0 @@ -lazy val utils = project.in(file("utils")) - -lazy val sharedSettings = Seq( - scalacOptions ++= Seq("-Ycheck:all", "-experimental") -) - -lazy val v1 = project.in(file("v1")) - .settings(sharedSettings) - -lazy val v1_app = project.in(file("v1_app")).dependsOn(utils) - .settings(sharedSettings) - .settings( - fork := true, - Runtime / unmanagedClasspath := Seq( - Attributed.blank((v1 / Runtime / classDirectory).value) - ), - Compile / unmanagedClasspath := Seq( - Attributed.blank((v1 / Compile / classDirectory).value) - ), - ) - -lazy val v2 = project.in(file("v2")) - .settings(sharedSettings) - -lazy val v2_app = project.in(file("v2_app")).dependsOn(utils) - .settings(sharedSettings) - .settings( - fork := true, - Runtime / unmanagedClasspath := Seq( - // add v1_app, compiled against v1, to the classpath - Attributed.blank((v1_app / Runtime / classDirectory).value), - Attributed.blank((v2 / Runtime / classDirectory).value) - ), - Compile / unmanagedClasspath := Seq( - Attributed.blank((v2 / Compile / classDirectory).value) - ), - ) - -lazy val v3 = project.in(file("v3")) - .settings(sharedSettings) - -lazy val v3_app = project.in(file("v3_app")).dependsOn(utils) - .settings(sharedSettings) - .settings( - fork := true, - Runtime / unmanagedClasspath := Seq( - // add v1_app, compiled against v1, to the classpath - Attributed.blank((v1_app / Runtime / classDirectory).value), - // add v2_app, compiled against v2, to the classpath - Attributed.blank((v2_app / Runtime / classDirectory).value), - Attributed.blank((v3 / Runtime / classDirectory).value) - ), - Compile / unmanagedClasspath := Seq( - Attributed.blank((v3 / Compile / classDirectory).value) - ), - ) diff --git a/sbt-test/unroll-annot/objectMethod/project/DottyInjectedPlugin.scala b/sbt-test/unroll-annot/objectMethod/project/DottyInjectedPlugin.scala deleted file mode 100644 index 69f15d168bfc..000000000000 --- a/sbt-test/unroll-annot/objectMethod/project/DottyInjectedPlugin.scala +++ /dev/null @@ -1,12 +0,0 @@ -import sbt._ -import Keys._ - -object DottyInjectedPlugin extends AutoPlugin { - override def requires = plugins.JvmPlugin - override def trigger = allRequirements - - override val projectSettings = Seq( - scalaVersion := sys.props("plugin.scalaVersion"), - scalacOptions += "-source:3.0-migration" - ) -} diff --git a/sbt-test/unroll-annot/objectMethod/test b/sbt-test/unroll-annot/objectMethod/test deleted file mode 100644 index e8e500857b0e..000000000000 --- a/sbt-test/unroll-annot/objectMethod/test +++ /dev/null @@ -1,14 +0,0 @@ -# compile and run a basic version of Unrolled (v1), and an app that uses it -> v1/compile -> v1_app/runMain unroll.UnrollTestMainV1 -# add a field to the case class (v2), and update the app to use it, -# and ensure the old version (v1) still links -> v2/compile -> v2_app/runMain unroll.UnrollTestMainV1 -> v2_app/runMain unroll.UnrollTestMainV2 -# add a field to the case class (v3), and update the app to use it, -# and ensure the old versions (v1, v2) still link -> v3/compile -> v3_app/runMain unroll.UnrollTestMainV1 -> v3_app/runMain unroll.UnrollTestMainV2 -> v3_app/runMain unroll.UnrollTestMainV3 diff --git a/sbt-test/unroll-annot/objectMethod/utils/src/main/scala/TestUtils.scala b/sbt-test/unroll-annot/objectMethod/utils/src/main/scala/TestUtils.scala deleted file mode 100644 index 6ac413c9fe98..000000000000 --- a/sbt-test/unroll-annot/objectMethod/utils/src/main/scala/TestUtils.scala +++ /dev/null @@ -1,12 +0,0 @@ -package unroll - -object TestUtils { - def logAssertStartsWith(actual: String, expected: String): Unit = { - assert(actual.startsWith(expected)) - val suffix = { - val suffix0 = actual.stripPrefix(expected) - if (suffix0.isEmpty) "" else s""" + "$suffix0"""" - } - println(s"""Assertion passed: found "$expected"$suffix""") - } -} diff --git a/sbt-test/unroll-annot/primaryConstructor/build.sbt b/sbt-test/unroll-annot/primaryConstructor/build.sbt deleted file mode 100644 index fc692a0473a6..000000000000 --- a/sbt-test/unroll-annot/primaryConstructor/build.sbt +++ /dev/null @@ -1,56 +0,0 @@ -lazy val utils = project.in(file("utils")) - -lazy val sharedSettings = Seq( - scalacOptions ++= Seq("-Ycheck:all", "-experimental") -) - -lazy val v1 = project.in(file("v1")) - .settings(sharedSettings) - -lazy val v1_app = project.in(file("v1_app")).dependsOn(utils) - .settings(sharedSettings) - .settings( - fork := true, - Runtime / unmanagedClasspath := Seq( - Attributed.blank((v1 / Runtime / classDirectory).value) - ), - Compile / unmanagedClasspath := Seq( - Attributed.blank((v1 / Compile / classDirectory).value) - ), - ) - -lazy val v2 = project.in(file("v2")) - .settings(sharedSettings) - -lazy val v2_app = project.in(file("v2_app")).dependsOn(utils) - .settings(sharedSettings) - .settings( - fork := true, - Runtime / unmanagedClasspath := Seq( - // add v1_app, compiled against v1, to the classpath - Attributed.blank((v1_app / Runtime / classDirectory).value), - Attributed.blank((v2 / Runtime / classDirectory).value) - ), - Compile / unmanagedClasspath := Seq( - Attributed.blank((v2 / Compile / classDirectory).value) - ), - ) - -lazy val v3 = project.in(file("v3")) - .settings(sharedSettings) - -lazy val v3_app = project.in(file("v3_app")).dependsOn(utils) - .settings(sharedSettings) - .settings( - fork := true, - Runtime / unmanagedClasspath := Seq( - // add v1_app, compiled against v1, to the classpath - Attributed.blank((v1_app / Runtime / classDirectory).value), - // add v2_app, compiled against v2, to the classpath - Attributed.blank((v2_app / Runtime / classDirectory).value), - Attributed.blank((v3 / Runtime / classDirectory).value) - ), - Compile / unmanagedClasspath := Seq( - Attributed.blank((v3 / Compile / classDirectory).value) - ), - ) diff --git a/sbt-test/unroll-annot/primaryConstructor/project/DottyInjectedPlugin.scala b/sbt-test/unroll-annot/primaryConstructor/project/DottyInjectedPlugin.scala deleted file mode 100644 index 69f15d168bfc..000000000000 --- a/sbt-test/unroll-annot/primaryConstructor/project/DottyInjectedPlugin.scala +++ /dev/null @@ -1,12 +0,0 @@ -import sbt._ -import Keys._ - -object DottyInjectedPlugin extends AutoPlugin { - override def requires = plugins.JvmPlugin - override def trigger = allRequirements - - override val projectSettings = Seq( - scalaVersion := sys.props("plugin.scalaVersion"), - scalacOptions += "-source:3.0-migration" - ) -} diff --git a/sbt-test/unroll-annot/primaryConstructor/test b/sbt-test/unroll-annot/primaryConstructor/test deleted file mode 100644 index e8e500857b0e..000000000000 --- a/sbt-test/unroll-annot/primaryConstructor/test +++ /dev/null @@ -1,14 +0,0 @@ -# compile and run a basic version of Unrolled (v1), and an app that uses it -> v1/compile -> v1_app/runMain unroll.UnrollTestMainV1 -# add a field to the case class (v2), and update the app to use it, -# and ensure the old version (v1) still links -> v2/compile -> v2_app/runMain unroll.UnrollTestMainV1 -> v2_app/runMain unroll.UnrollTestMainV2 -# add a field to the case class (v3), and update the app to use it, -# and ensure the old versions (v1, v2) still link -> v3/compile -> v3_app/runMain unroll.UnrollTestMainV1 -> v3_app/runMain unroll.UnrollTestMainV2 -> v3_app/runMain unroll.UnrollTestMainV3 diff --git a/sbt-test/unroll-annot/primaryConstructor/utils/src/main/scala/TestUtils.scala b/sbt-test/unroll-annot/primaryConstructor/utils/src/main/scala/TestUtils.scala deleted file mode 100644 index 6ac413c9fe98..000000000000 --- a/sbt-test/unroll-annot/primaryConstructor/utils/src/main/scala/TestUtils.scala +++ /dev/null @@ -1,12 +0,0 @@ -package unroll - -object TestUtils { - def logAssertStartsWith(actual: String, expected: String): Unit = { - assert(actual.startsWith(expected)) - val suffix = { - val suffix0 = actual.stripPrefix(expected) - if (suffix0.isEmpty) "" else s""" + "$suffix0"""" - } - println(s"""Assertion passed: found "$expected"$suffix""") - } -} diff --git a/sbt-test/unroll-annot/secondParameterList/build.sbt b/sbt-test/unroll-annot/secondParameterList/build.sbt deleted file mode 100644 index fc692a0473a6..000000000000 --- a/sbt-test/unroll-annot/secondParameterList/build.sbt +++ /dev/null @@ -1,56 +0,0 @@ -lazy val utils = project.in(file("utils")) - -lazy val sharedSettings = Seq( - scalacOptions ++= Seq("-Ycheck:all", "-experimental") -) - -lazy val v1 = project.in(file("v1")) - .settings(sharedSettings) - -lazy val v1_app = project.in(file("v1_app")).dependsOn(utils) - .settings(sharedSettings) - .settings( - fork := true, - Runtime / unmanagedClasspath := Seq( - Attributed.blank((v1 / Runtime / classDirectory).value) - ), - Compile / unmanagedClasspath := Seq( - Attributed.blank((v1 / Compile / classDirectory).value) - ), - ) - -lazy val v2 = project.in(file("v2")) - .settings(sharedSettings) - -lazy val v2_app = project.in(file("v2_app")).dependsOn(utils) - .settings(sharedSettings) - .settings( - fork := true, - Runtime / unmanagedClasspath := Seq( - // add v1_app, compiled against v1, to the classpath - Attributed.blank((v1_app / Runtime / classDirectory).value), - Attributed.blank((v2 / Runtime / classDirectory).value) - ), - Compile / unmanagedClasspath := Seq( - Attributed.blank((v2 / Compile / classDirectory).value) - ), - ) - -lazy val v3 = project.in(file("v3")) - .settings(sharedSettings) - -lazy val v3_app = project.in(file("v3_app")).dependsOn(utils) - .settings(sharedSettings) - .settings( - fork := true, - Runtime / unmanagedClasspath := Seq( - // add v1_app, compiled against v1, to the classpath - Attributed.blank((v1_app / Runtime / classDirectory).value), - // add v2_app, compiled against v2, to the classpath - Attributed.blank((v2_app / Runtime / classDirectory).value), - Attributed.blank((v3 / Runtime / classDirectory).value) - ), - Compile / unmanagedClasspath := Seq( - Attributed.blank((v3 / Compile / classDirectory).value) - ), - ) diff --git a/sbt-test/unroll-annot/secondParameterList/project/DottyInjectedPlugin.scala b/sbt-test/unroll-annot/secondParameterList/project/DottyInjectedPlugin.scala deleted file mode 100644 index 69f15d168bfc..000000000000 --- a/sbt-test/unroll-annot/secondParameterList/project/DottyInjectedPlugin.scala +++ /dev/null @@ -1,12 +0,0 @@ -import sbt._ -import Keys._ - -object DottyInjectedPlugin extends AutoPlugin { - override def requires = plugins.JvmPlugin - override def trigger = allRequirements - - override val projectSettings = Seq( - scalaVersion := sys.props("plugin.scalaVersion"), - scalacOptions += "-source:3.0-migration" - ) -} diff --git a/sbt-test/unroll-annot/secondParameterList/test b/sbt-test/unroll-annot/secondParameterList/test deleted file mode 100644 index e8e500857b0e..000000000000 --- a/sbt-test/unroll-annot/secondParameterList/test +++ /dev/null @@ -1,14 +0,0 @@ -# compile and run a basic version of Unrolled (v1), and an app that uses it -> v1/compile -> v1_app/runMain unroll.UnrollTestMainV1 -# add a field to the case class (v2), and update the app to use it, -# and ensure the old version (v1) still links -> v2/compile -> v2_app/runMain unroll.UnrollTestMainV1 -> v2_app/runMain unroll.UnrollTestMainV2 -# add a field to the case class (v3), and update the app to use it, -# and ensure the old versions (v1, v2) still link -> v3/compile -> v3_app/runMain unroll.UnrollTestMainV1 -> v3_app/runMain unroll.UnrollTestMainV2 -> v3_app/runMain unroll.UnrollTestMainV3 diff --git a/sbt-test/unroll-annot/secondParameterList/utils/src/main/scala/TestUtils.scala b/sbt-test/unroll-annot/secondParameterList/utils/src/main/scala/TestUtils.scala deleted file mode 100644 index 6ac413c9fe98..000000000000 --- a/sbt-test/unroll-annot/secondParameterList/utils/src/main/scala/TestUtils.scala +++ /dev/null @@ -1,12 +0,0 @@ -package unroll - -object TestUtils { - def logAssertStartsWith(actual: String, expected: String): Unit = { - assert(actual.startsWith(expected)) - val suffix = { - val suffix0 = actual.stripPrefix(expected) - if (suffix0.isEmpty) "" else s""" + "$suffix0"""" - } - println(s"""Assertion passed: found "$expected"$suffix""") - } -} diff --git a/sbt-test/unroll-annot/secondaryConstructor/build.sbt b/sbt-test/unroll-annot/secondaryConstructor/build.sbt deleted file mode 100644 index fc692a0473a6..000000000000 --- a/sbt-test/unroll-annot/secondaryConstructor/build.sbt +++ /dev/null @@ -1,56 +0,0 @@ -lazy val utils = project.in(file("utils")) - -lazy val sharedSettings = Seq( - scalacOptions ++= Seq("-Ycheck:all", "-experimental") -) - -lazy val v1 = project.in(file("v1")) - .settings(sharedSettings) - -lazy val v1_app = project.in(file("v1_app")).dependsOn(utils) - .settings(sharedSettings) - .settings( - fork := true, - Runtime / unmanagedClasspath := Seq( - Attributed.blank((v1 / Runtime / classDirectory).value) - ), - Compile / unmanagedClasspath := Seq( - Attributed.blank((v1 / Compile / classDirectory).value) - ), - ) - -lazy val v2 = project.in(file("v2")) - .settings(sharedSettings) - -lazy val v2_app = project.in(file("v2_app")).dependsOn(utils) - .settings(sharedSettings) - .settings( - fork := true, - Runtime / unmanagedClasspath := Seq( - // add v1_app, compiled against v1, to the classpath - Attributed.blank((v1_app / Runtime / classDirectory).value), - Attributed.blank((v2 / Runtime / classDirectory).value) - ), - Compile / unmanagedClasspath := Seq( - Attributed.blank((v2 / Compile / classDirectory).value) - ), - ) - -lazy val v3 = project.in(file("v3")) - .settings(sharedSettings) - -lazy val v3_app = project.in(file("v3_app")).dependsOn(utils) - .settings(sharedSettings) - .settings( - fork := true, - Runtime / unmanagedClasspath := Seq( - // add v1_app, compiled against v1, to the classpath - Attributed.blank((v1_app / Runtime / classDirectory).value), - // add v2_app, compiled against v2, to the classpath - Attributed.blank((v2_app / Runtime / classDirectory).value), - Attributed.blank((v3 / Runtime / classDirectory).value) - ), - Compile / unmanagedClasspath := Seq( - Attributed.blank((v3 / Compile / classDirectory).value) - ), - ) diff --git a/sbt-test/unroll-annot/secondaryConstructor/project/DottyInjectedPlugin.scala b/sbt-test/unroll-annot/secondaryConstructor/project/DottyInjectedPlugin.scala deleted file mode 100644 index 69f15d168bfc..000000000000 --- a/sbt-test/unroll-annot/secondaryConstructor/project/DottyInjectedPlugin.scala +++ /dev/null @@ -1,12 +0,0 @@ -import sbt._ -import Keys._ - -object DottyInjectedPlugin extends AutoPlugin { - override def requires = plugins.JvmPlugin - override def trigger = allRequirements - - override val projectSettings = Seq( - scalaVersion := sys.props("plugin.scalaVersion"), - scalacOptions += "-source:3.0-migration" - ) -} diff --git a/sbt-test/unroll-annot/secondaryConstructor/test b/sbt-test/unroll-annot/secondaryConstructor/test deleted file mode 100644 index e8e500857b0e..000000000000 --- a/sbt-test/unroll-annot/secondaryConstructor/test +++ /dev/null @@ -1,14 +0,0 @@ -# compile and run a basic version of Unrolled (v1), and an app that uses it -> v1/compile -> v1_app/runMain unroll.UnrollTestMainV1 -# add a field to the case class (v2), and update the app to use it, -# and ensure the old version (v1) still links -> v2/compile -> v2_app/runMain unroll.UnrollTestMainV1 -> v2_app/runMain unroll.UnrollTestMainV2 -# add a field to the case class (v3), and update the app to use it, -# and ensure the old versions (v1, v2) still link -> v3/compile -> v3_app/runMain unroll.UnrollTestMainV1 -> v3_app/runMain unroll.UnrollTestMainV2 -> v3_app/runMain unroll.UnrollTestMainV3 diff --git a/sbt-test/unroll-annot/secondaryConstructor/utils/src/main/scala/TestUtils.scala b/sbt-test/unroll-annot/secondaryConstructor/utils/src/main/scala/TestUtils.scala deleted file mode 100644 index 6ac413c9fe98..000000000000 --- a/sbt-test/unroll-annot/secondaryConstructor/utils/src/main/scala/TestUtils.scala +++ /dev/null @@ -1,12 +0,0 @@ -package unroll - -object TestUtils { - def logAssertStartsWith(actual: String, expected: String): Unit = { - assert(actual.startsWith(expected)) - val suffix = { - val suffix0 = actual.stripPrefix(expected) - if (suffix0.isEmpty) "" else s""" + "$suffix0"""" - } - println(s"""Assertion passed: found "$expected"$suffix""") - } -} diff --git a/sbt-test/unroll-annot/traitMethod/build.sbt b/sbt-test/unroll-annot/traitMethod/build.sbt deleted file mode 100644 index fc692a0473a6..000000000000 --- a/sbt-test/unroll-annot/traitMethod/build.sbt +++ /dev/null @@ -1,56 +0,0 @@ -lazy val utils = project.in(file("utils")) - -lazy val sharedSettings = Seq( - scalacOptions ++= Seq("-Ycheck:all", "-experimental") -) - -lazy val v1 = project.in(file("v1")) - .settings(sharedSettings) - -lazy val v1_app = project.in(file("v1_app")).dependsOn(utils) - .settings(sharedSettings) - .settings( - fork := true, - Runtime / unmanagedClasspath := Seq( - Attributed.blank((v1 / Runtime / classDirectory).value) - ), - Compile / unmanagedClasspath := Seq( - Attributed.blank((v1 / Compile / classDirectory).value) - ), - ) - -lazy val v2 = project.in(file("v2")) - .settings(sharedSettings) - -lazy val v2_app = project.in(file("v2_app")).dependsOn(utils) - .settings(sharedSettings) - .settings( - fork := true, - Runtime / unmanagedClasspath := Seq( - // add v1_app, compiled against v1, to the classpath - Attributed.blank((v1_app / Runtime / classDirectory).value), - Attributed.blank((v2 / Runtime / classDirectory).value) - ), - Compile / unmanagedClasspath := Seq( - Attributed.blank((v2 / Compile / classDirectory).value) - ), - ) - -lazy val v3 = project.in(file("v3")) - .settings(sharedSettings) - -lazy val v3_app = project.in(file("v3_app")).dependsOn(utils) - .settings(sharedSettings) - .settings( - fork := true, - Runtime / unmanagedClasspath := Seq( - // add v1_app, compiled against v1, to the classpath - Attributed.blank((v1_app / Runtime / classDirectory).value), - // add v2_app, compiled against v2, to the classpath - Attributed.blank((v2_app / Runtime / classDirectory).value), - Attributed.blank((v3 / Runtime / classDirectory).value) - ), - Compile / unmanagedClasspath := Seq( - Attributed.blank((v3 / Compile / classDirectory).value) - ), - ) diff --git a/sbt-test/unroll-annot/traitMethod/project/DottyInjectedPlugin.scala b/sbt-test/unroll-annot/traitMethod/project/DottyInjectedPlugin.scala deleted file mode 100644 index 69f15d168bfc..000000000000 --- a/sbt-test/unroll-annot/traitMethod/project/DottyInjectedPlugin.scala +++ /dev/null @@ -1,12 +0,0 @@ -import sbt._ -import Keys._ - -object DottyInjectedPlugin extends AutoPlugin { - override def requires = plugins.JvmPlugin - override def trigger = allRequirements - - override val projectSettings = Seq( - scalaVersion := sys.props("plugin.scalaVersion"), - scalacOptions += "-source:3.0-migration" - ) -} diff --git a/sbt-test/unroll-annot/traitMethod/test b/sbt-test/unroll-annot/traitMethod/test deleted file mode 100644 index e8e500857b0e..000000000000 --- a/sbt-test/unroll-annot/traitMethod/test +++ /dev/null @@ -1,14 +0,0 @@ -# compile and run a basic version of Unrolled (v1), and an app that uses it -> v1/compile -> v1_app/runMain unroll.UnrollTestMainV1 -# add a field to the case class (v2), and update the app to use it, -# and ensure the old version (v1) still links -> v2/compile -> v2_app/runMain unroll.UnrollTestMainV1 -> v2_app/runMain unroll.UnrollTestMainV2 -# add a field to the case class (v3), and update the app to use it, -# and ensure the old versions (v1, v2) still link -> v3/compile -> v3_app/runMain unroll.UnrollTestMainV1 -> v3_app/runMain unroll.UnrollTestMainV2 -> v3_app/runMain unroll.UnrollTestMainV3 diff --git a/sbt-test/unroll-annot/traitMethod/utils/src/main/scala/TestUtils.scala b/sbt-test/unroll-annot/traitMethod/utils/src/main/scala/TestUtils.scala deleted file mode 100644 index 6ac413c9fe98..000000000000 --- a/sbt-test/unroll-annot/traitMethod/utils/src/main/scala/TestUtils.scala +++ /dev/null @@ -1,12 +0,0 @@ -package unroll - -object TestUtils { - def logAssertStartsWith(actual: String, expected: String): Unit = { - assert(actual.startsWith(expected)) - val suffix = { - val suffix0 = actual.stripPrefix(expected) - if (suffix0.isEmpty) "" else s""" + "$suffix0"""" - } - println(s"""Assertion passed: found "$expected"$suffix""") - } -} diff --git a/sbt-test/unroll-annot/classMethod/utils/src/main/scala/TestUtils.scala b/tests/run/unroll-caseclass-integration/TestUtils_1.scala similarity index 91% rename from sbt-test/unroll-annot/classMethod/utils/src/main/scala/TestUtils.scala rename to tests/run/unroll-caseclass-integration/TestUtils_1.scala index 6ac413c9fe98..e639a54d924b 100644 --- a/sbt-test/unroll-annot/classMethod/utils/src/main/scala/TestUtils.scala +++ b/tests/run/unroll-caseclass-integration/TestUtils_1.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll object TestUtils { diff --git a/tests/run/unroll-caseclass-integration/Test_4.scala b/tests/run/unroll-caseclass-integration/Test_4.scala new file mode 100644 index 000000000000..cae956f8b1bf --- /dev/null +++ b/tests/run/unroll-caseclass-integration/Test_4.scala @@ -0,0 +1,8 @@ +//> using options -experimental +// scalajs: --skip +import unroll.* + +@main def Test: Unit = + UnrollTestMainV1.main(Array.empty[String]) + UnrollTestMainV2.main(Array.empty[String]) + UnrollTestMainV3.main(Array.empty[String]) diff --git a/sbt-test/unroll-annot/caseclass/v1_app/src/main/scala/UnrollTestMain.scala b/tests/run/unroll-caseclass-integration/UnrollTestMain_1.scala similarity index 95% rename from sbt-test/unroll-annot/caseclass/v1_app/src/main/scala/UnrollTestMain.scala rename to tests/run/unroll-caseclass-integration/UnrollTestMain_1.scala index e0b058ad0230..45ce6a768f2a 100644 --- a/sbt-test/unroll-annot/caseclass/v1_app/src/main/scala/UnrollTestMain.scala +++ b/tests/run/unroll-caseclass-integration/UnrollTestMain_1.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith diff --git a/sbt-test/unroll-annot/caseclass/v2_app/src/main/scala/UnrollTestMain.scala b/tests/run/unroll-caseclass-integration/UnrollTestMain_2.scala similarity index 96% rename from sbt-test/unroll-annot/caseclass/v2_app/src/main/scala/UnrollTestMain.scala rename to tests/run/unroll-caseclass-integration/UnrollTestMain_2.scala index c266a5f8c88e..f6cfbfc54a2c 100644 --- a/sbt-test/unroll-annot/caseclass/v2_app/src/main/scala/UnrollTestMain.scala +++ b/tests/run/unroll-caseclass-integration/UnrollTestMain_2.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith diff --git a/sbt-test/unroll-annot/caseclass/v3_app/src/main/scala/UnrollTestMain.scala b/tests/run/unroll-caseclass-integration/UnrollTestMain_3.scala similarity index 97% rename from sbt-test/unroll-annot/caseclass/v3_app/src/main/scala/UnrollTestMain.scala rename to tests/run/unroll-caseclass-integration/UnrollTestMain_3.scala index a58303a6bdad..b0e4d7a5d25a 100644 --- a/sbt-test/unroll-annot/caseclass/v3_app/src/main/scala/UnrollTestMain.scala +++ b/tests/run/unroll-caseclass-integration/UnrollTestMain_3.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith diff --git a/sbt-test/unroll-annot/caseclass/v3_app/src/main/scala/UnrollTestPlatformSpecific.scala b/tests/run/unroll-caseclass-integration/UnrollTestPlatformSpecific_3.scala similarity index 94% rename from sbt-test/unroll-annot/caseclass/v3_app/src/main/scala/UnrollTestPlatformSpecific.scala rename to tests/run/unroll-caseclass-integration/UnrollTestPlatformSpecific_3.scala index 07dee69cd8a7..e06a38502c62 100644 --- a/sbt-test/unroll-annot/caseclass/v3_app/src/main/scala/UnrollTestPlatformSpecific.scala +++ b/tests/run/unroll-caseclass-integration/UnrollTestPlatformSpecific_3.scala @@ -1,3 +1,5 @@ +//> using options -experimental +// scalajs: --skip package unroll object UnrollTestPlatformSpecificV3{ @@ -30,4 +32,4 @@ object UnrollTestPlatformSpecificV3{ cls.getConstructors.foreach(println) } -} \ No newline at end of file +} diff --git a/sbt-test/unroll-annot/caseclass/v1_app/src/main/scala/UnrollTestScalaSpecific.scala b/tests/run/unroll-caseclass-integration/UnrollTestScalaSpecific_1.scala similarity index 78% rename from sbt-test/unroll-annot/caseclass/v1_app/src/main/scala/UnrollTestScalaSpecific.scala rename to tests/run/unroll-caseclass-integration/UnrollTestScalaSpecific_1.scala index 514905a741f4..28eb2815e979 100644 --- a/sbt-test/unroll-annot/caseclass/v1_app/src/main/scala/UnrollTestScalaSpecific.scala +++ b/tests/run/unroll-caseclass-integration/UnrollTestScalaSpecific_1.scala @@ -1,10 +1,11 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith object UnrollTestScalaSpecificV1{ def test() = { - val unrolled = Unrolled.fromProduct( + val unrolled = summon[scala.deriving.Mirror.Of[Unrolled]].fromProduct( new Product{ def canEqual(that: Any) = true def productArity = 2 diff --git a/sbt-test/unroll-annot/caseclass/v2_app/src/main/scala/UnrollTestScalaSpecific.scala b/tests/run/unroll-caseclass-integration/UnrollTestScalaSpecific_2.scala similarity index 79% rename from sbt-test/unroll-annot/caseclass/v2_app/src/main/scala/UnrollTestScalaSpecific.scala rename to tests/run/unroll-caseclass-integration/UnrollTestScalaSpecific_2.scala index 88ead065de6e..5d4079a093ce 100644 --- a/sbt-test/unroll-annot/caseclass/v2_app/src/main/scala/UnrollTestScalaSpecific.scala +++ b/tests/run/unroll-caseclass-integration/UnrollTestScalaSpecific_2.scala @@ -1,10 +1,11 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith object UnrollTestScalaSpecificV2{ def test() = { - val unrolled = Unrolled.fromProduct( + val unrolled = summon[scala.deriving.Mirror.Of[Unrolled]].fromProduct( new Product { def canEqual(that: Any) = true def productArity = 3 diff --git a/sbt-test/unroll-annot/caseclass/v3_app/src/main/scala/UnrollTestScalaSpecific.scala b/tests/run/unroll-caseclass-integration/UnrollTestScalaSpecific_3.scala similarity index 80% rename from sbt-test/unroll-annot/caseclass/v3_app/src/main/scala/UnrollTestScalaSpecific.scala rename to tests/run/unroll-caseclass-integration/UnrollTestScalaSpecific_3.scala index 13d4fffe7f62..46f84998baa0 100644 --- a/sbt-test/unroll-annot/caseclass/v3_app/src/main/scala/UnrollTestScalaSpecific.scala +++ b/tests/run/unroll-caseclass-integration/UnrollTestScalaSpecific_3.scala @@ -1,8 +1,9 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith object UnrollTestScalaSpecificV3{ def apply() = { - val unrolled = Unrolled.fromProduct( + val unrolled = summon[scala.deriving.Mirror.Of[Unrolled]].fromProduct( new Product { def canEqual(that: Any) = true def productArity = 4 diff --git a/sbt-test/unroll-annot/caseclass/v1/src/main/scala/Unrolled.scala b/tests/run/unroll-caseclass-integration/Unrolled_1.scala similarity index 71% rename from sbt-test/unroll-annot/caseclass/v1/src/main/scala/Unrolled.scala rename to tests/run/unroll-caseclass-integration/Unrolled_1.scala index 997ae2f2dc00..e3f57bddd325 100644 --- a/sbt-test/unroll-annot/caseclass/v1/src/main/scala/Unrolled.scala +++ b/tests/run/unroll-caseclass-integration/Unrolled_1.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll case class Unrolled(s: String, n: Int = 1){ diff --git a/sbt-test/unroll-annot/caseclass/v2/src/main/scala/Unrolled.scala b/tests/run/unroll-caseclass-integration/Unrolled_2.scala similarity index 81% rename from sbt-test/unroll-annot/caseclass/v2/src/main/scala/Unrolled.scala rename to tests/run/unroll-caseclass-integration/Unrolled_2.scala index 916c44550a13..cb2232a57726 100644 --- a/sbt-test/unroll-annot/caseclass/v2/src/main/scala/Unrolled.scala +++ b/tests/run/unroll-caseclass-integration/Unrolled_2.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import scala.annotation.unroll diff --git a/sbt-test/unroll-annot/caseclass/v3/src/main/scala/Unrolled.scala b/tests/run/unroll-caseclass-integration/Unrolled_3.scala similarity index 84% rename from sbt-test/unroll-annot/caseclass/v3/src/main/scala/Unrolled.scala rename to tests/run/unroll-caseclass-integration/Unrolled_3.scala index f1bf8c01ad2a..66b4981660df 100644 --- a/sbt-test/unroll-annot/caseclass/v3/src/main/scala/Unrolled.scala +++ b/tests/run/unroll-caseclass-integration/Unrolled_3.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import scala.annotation.unroll diff --git a/sbt-test/unroll-annot/curriedMethod/utils/src/main/scala/TestUtils.scala b/tests/run/unroll-classMethod-integration/TestUtils_1.scala similarity index 91% rename from sbt-test/unroll-annot/curriedMethod/utils/src/main/scala/TestUtils.scala rename to tests/run/unroll-classMethod-integration/TestUtils_1.scala index 6ac413c9fe98..e639a54d924b 100644 --- a/sbt-test/unroll-annot/curriedMethod/utils/src/main/scala/TestUtils.scala +++ b/tests/run/unroll-classMethod-integration/TestUtils_1.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll object TestUtils { diff --git a/tests/run/unroll-classMethod-integration/Test_4.scala b/tests/run/unroll-classMethod-integration/Test_4.scala new file mode 100644 index 000000000000..cae956f8b1bf --- /dev/null +++ b/tests/run/unroll-classMethod-integration/Test_4.scala @@ -0,0 +1,8 @@ +//> using options -experimental +// scalajs: --skip +import unroll.* + +@main def Test: Unit = + UnrollTestMainV1.main(Array.empty[String]) + UnrollTestMainV2.main(Array.empty[String]) + UnrollTestMainV3.main(Array.empty[String]) diff --git a/sbt-test/unroll-annot/genericMethod/v1_app/src/main/scala/UnrollTestMain.scala b/tests/run/unroll-classMethod-integration/UnrollTestMain_1.scala similarity index 85% rename from sbt-test/unroll-annot/genericMethod/v1_app/src/main/scala/UnrollTestMain.scala rename to tests/run/unroll-classMethod-integration/UnrollTestMain_1.scala index f36e9dd07fed..62d61c81d21d 100644 --- a/sbt-test/unroll-annot/genericMethod/v1_app/src/main/scala/UnrollTestMain.scala +++ b/tests/run/unroll-classMethod-integration/UnrollTestMain_1.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith diff --git a/sbt-test/unroll-annot/classMethod/v2_app/src/main/scala/UnrollTestMain.scala b/tests/run/unroll-classMethod-integration/UnrollTestMain_2.scala similarity index 91% rename from sbt-test/unroll-annot/classMethod/v2_app/src/main/scala/UnrollTestMain.scala rename to tests/run/unroll-classMethod-integration/UnrollTestMain_2.scala index 91b54aa9742c..921ee48ff0db 100644 --- a/sbt-test/unroll-annot/classMethod/v2_app/src/main/scala/UnrollTestMain.scala +++ b/tests/run/unroll-classMethod-integration/UnrollTestMain_2.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith diff --git a/sbt-test/unroll-annot/genericMethod/v3_app/src/main/scala/UnrollTestMain.scala b/tests/run/unroll-classMethod-integration/UnrollTestMain_3.scala similarity index 93% rename from sbt-test/unroll-annot/genericMethod/v3_app/src/main/scala/UnrollTestMain.scala rename to tests/run/unroll-classMethod-integration/UnrollTestMain_3.scala index 9a6daa3a9210..bc985b58c359 100644 --- a/sbt-test/unroll-annot/genericMethod/v3_app/src/main/scala/UnrollTestMain.scala +++ b/tests/run/unroll-classMethod-integration/UnrollTestMain_3.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith diff --git a/sbt-test/unroll-annot/classMethod/v3_app/src/main/scala/UnrollTestPlatformSpecific.scala b/tests/run/unroll-classMethod-integration/UnrollTestPlatformSpecific_3.scala similarity index 94% rename from sbt-test/unroll-annot/classMethod/v3_app/src/main/scala/UnrollTestPlatformSpecific.scala rename to tests/run/unroll-classMethod-integration/UnrollTestPlatformSpecific_3.scala index e8527808befd..3b5dc603fd3a 100644 --- a/sbt-test/unroll-annot/classMethod/v3_app/src/main/scala/UnrollTestPlatformSpecific.scala +++ b/tests/run/unroll-classMethod-integration/UnrollTestPlatformSpecific_3.scala @@ -1,3 +1,5 @@ +//> using options -experimental +// scalajs: --skip package unroll object UnrollTestPlatformSpecificV3{ @@ -27,4 +29,4 @@ object UnrollTestPlatformSpecificV3{ cls.getMethods.filter(_.getName.contains("foo")).foreach(println) } -} \ No newline at end of file +} diff --git a/sbt-test/unroll-annot/classMethod/v1/src/main/scala/Unrolled.scala b/tests/run/unroll-classMethod-integration/Unrolled_1.scala similarity index 64% rename from sbt-test/unroll-annot/classMethod/v1/src/main/scala/Unrolled.scala rename to tests/run/unroll-classMethod-integration/Unrolled_1.scala index 638bcfdeb96d..aa6ca65fe6a3 100644 --- a/sbt-test/unroll-annot/classMethod/v1/src/main/scala/Unrolled.scala +++ b/tests/run/unroll-classMethod-integration/Unrolled_1.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll class Unrolled{ diff --git a/sbt-test/unroll-annot/classMethod/v2/src/main/scala/Unrolled.scala b/tests/run/unroll-classMethod-integration/Unrolled_2.scala similarity index 81% rename from sbt-test/unroll-annot/classMethod/v2/src/main/scala/Unrolled.scala rename to tests/run/unroll-classMethod-integration/Unrolled_2.scala index 6d756148a098..2091bb4c5a9e 100644 --- a/sbt-test/unroll-annot/classMethod/v2/src/main/scala/Unrolled.scala +++ b/tests/run/unroll-classMethod-integration/Unrolled_2.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import scala.annotation.unroll diff --git a/sbt-test/unroll-annot/classMethod/v3/src/main/scala/Unrolled.scala b/tests/run/unroll-classMethod-integration/Unrolled_3.scala similarity index 84% rename from sbt-test/unroll-annot/classMethod/v3/src/main/scala/Unrolled.scala rename to tests/run/unroll-classMethod-integration/Unrolled_3.scala index 684c3906750e..8991bda3aeb7 100644 --- a/sbt-test/unroll-annot/classMethod/v3/src/main/scala/Unrolled.scala +++ b/tests/run/unroll-classMethod-integration/Unrolled_3.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import scala.annotation.unroll diff --git a/sbt-test/unroll-annot/genericMethod/utils/src/main/scala/TestUtils.scala b/tests/run/unroll-curriedMethod-integration/TestUtils_1.scala similarity index 91% rename from sbt-test/unroll-annot/genericMethod/utils/src/main/scala/TestUtils.scala rename to tests/run/unroll-curriedMethod-integration/TestUtils_1.scala index 6ac413c9fe98..e639a54d924b 100644 --- a/sbt-test/unroll-annot/genericMethod/utils/src/main/scala/TestUtils.scala +++ b/tests/run/unroll-curriedMethod-integration/TestUtils_1.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll object TestUtils { diff --git a/tests/run/unroll-curriedMethod-integration/Test_4.scala b/tests/run/unroll-curriedMethod-integration/Test_4.scala new file mode 100644 index 000000000000..cae956f8b1bf --- /dev/null +++ b/tests/run/unroll-curriedMethod-integration/Test_4.scala @@ -0,0 +1,8 @@ +//> using options -experimental +// scalajs: --skip +import unroll.* + +@main def Test: Unit = + UnrollTestMainV1.main(Array.empty[String]) + UnrollTestMainV2.main(Array.empty[String]) + UnrollTestMainV3.main(Array.empty[String]) diff --git a/sbt-test/unroll-annot/curriedMethod/v1_app/src/main/scala/UnrollTestMain.scala b/tests/run/unroll-curriedMethod-integration/UnrollTestMain_1.scala similarity index 86% rename from sbt-test/unroll-annot/curriedMethod/v1_app/src/main/scala/UnrollTestMain.scala rename to tests/run/unroll-curriedMethod-integration/UnrollTestMain_1.scala index 8d1ca388477b..411aae125e20 100644 --- a/sbt-test/unroll-annot/curriedMethod/v1_app/src/main/scala/UnrollTestMain.scala +++ b/tests/run/unroll-curriedMethod-integration/UnrollTestMain_1.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith diff --git a/sbt-test/unroll-annot/curriedMethod/v2_app/src/main/scala/UnrollTestMain.scala b/tests/run/unroll-curriedMethod-integration/UnrollTestMain_2.scala similarity index 91% rename from sbt-test/unroll-annot/curriedMethod/v2_app/src/main/scala/UnrollTestMain.scala rename to tests/run/unroll-curriedMethod-integration/UnrollTestMain_2.scala index 66ad8fdf8698..9be52201ed8b 100644 --- a/sbt-test/unroll-annot/curriedMethod/v2_app/src/main/scala/UnrollTestMain.scala +++ b/tests/run/unroll-curriedMethod-integration/UnrollTestMain_2.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith diff --git a/sbt-test/unroll-annot/curriedMethod/v3_app/src/main/scala/UnrollTestMain.scala b/tests/run/unroll-curriedMethod-integration/UnrollTestMain_3.scala similarity index 93% rename from sbt-test/unroll-annot/curriedMethod/v3_app/src/main/scala/UnrollTestMain.scala rename to tests/run/unroll-curriedMethod-integration/UnrollTestMain_3.scala index 02b839fc07d2..1f281db4f497 100644 --- a/sbt-test/unroll-annot/curriedMethod/v3_app/src/main/scala/UnrollTestMain.scala +++ b/tests/run/unroll-curriedMethod-integration/UnrollTestMain_3.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith diff --git a/sbt-test/unroll-annot/curriedMethod/v3_app/src/main/scala/UnrollTestPlatformSpecific.scala b/tests/run/unroll-curriedMethod-integration/UnrollTestPlatformSpecific_3.scala similarity index 95% rename from sbt-test/unroll-annot/curriedMethod/v3_app/src/main/scala/UnrollTestPlatformSpecific.scala rename to tests/run/unroll-curriedMethod-integration/UnrollTestPlatformSpecific_3.scala index 61eeeb8756b8..69bbaf06d6ae 100644 --- a/sbt-test/unroll-annot/curriedMethod/v3_app/src/main/scala/UnrollTestPlatformSpecific.scala +++ b/tests/run/unroll-curriedMethod-integration/UnrollTestPlatformSpecific_3.scala @@ -1,3 +1,5 @@ +//> using options -experimental +// scalajs: --skip package unroll object UnrollTestPlatformSpecificV3{ @@ -26,4 +28,4 @@ object UnrollTestPlatformSpecificV3{ cls.getMethods.filter(_.getName.contains("foo")).foreach(println) } -} \ No newline at end of file +} diff --git a/sbt-test/unroll-annot/curriedMethod/v1/src/main/scala/Unrolled.scala b/tests/run/unroll-curriedMethod-integration/Unrolled_1.scala similarity index 72% rename from sbt-test/unroll-annot/curriedMethod/v1/src/main/scala/Unrolled.scala rename to tests/run/unroll-curriedMethod-integration/Unrolled_1.scala index e508d4345313..d6b8b06da582 100644 --- a/sbt-test/unroll-annot/curriedMethod/v1/src/main/scala/Unrolled.scala +++ b/tests/run/unroll-curriedMethod-integration/Unrolled_1.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll class Unrolled{ diff --git a/sbt-test/unroll-annot/curriedMethod/v2/src/main/scala/Unrolled.scala b/tests/run/unroll-curriedMethod-integration/Unrolled_2.scala similarity index 84% rename from sbt-test/unroll-annot/curriedMethod/v2/src/main/scala/Unrolled.scala rename to tests/run/unroll-curriedMethod-integration/Unrolled_2.scala index 595c06d6dc50..5a526bf6eeb2 100644 --- a/sbt-test/unroll-annot/curriedMethod/v2/src/main/scala/Unrolled.scala +++ b/tests/run/unroll-curriedMethod-integration/Unrolled_2.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import scala.annotation.unroll diff --git a/sbt-test/unroll-annot/curriedMethod/v3/src/main/scala/Unrolled.scala b/tests/run/unroll-curriedMethod-integration/Unrolled_3.scala similarity index 85% rename from sbt-test/unroll-annot/curriedMethod/v3/src/main/scala/Unrolled.scala rename to tests/run/unroll-curriedMethod-integration/Unrolled_3.scala index f34c9b071edd..008576a9a5c3 100644 --- a/sbt-test/unroll-annot/curriedMethod/v3/src/main/scala/Unrolled.scala +++ b/tests/run/unroll-curriedMethod-integration/Unrolled_3.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import scala.annotation.unroll diff --git a/sbt-test/unroll-annot/caseclass/utils/src/main/scala/TestUtils.scala b/tests/run/unroll-genericMethod-integration/TestUtils_1.scala similarity index 91% rename from sbt-test/unroll-annot/caseclass/utils/src/main/scala/TestUtils.scala rename to tests/run/unroll-genericMethod-integration/TestUtils_1.scala index 6ac413c9fe98..e639a54d924b 100644 --- a/sbt-test/unroll-annot/caseclass/utils/src/main/scala/TestUtils.scala +++ b/tests/run/unroll-genericMethod-integration/TestUtils_1.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll object TestUtils { diff --git a/tests/run/unroll-genericMethod-integration/Test_4.scala b/tests/run/unroll-genericMethod-integration/Test_4.scala new file mode 100644 index 000000000000..cae956f8b1bf --- /dev/null +++ b/tests/run/unroll-genericMethod-integration/Test_4.scala @@ -0,0 +1,8 @@ +//> using options -experimental +// scalajs: --skip +import unroll.* + +@main def Test: Unit = + UnrollTestMainV1.main(Array.empty[String]) + UnrollTestMainV2.main(Array.empty[String]) + UnrollTestMainV3.main(Array.empty[String]) diff --git a/sbt-test/unroll-annot/classMethod/v1_app/src/main/scala/UnrollTestMain.scala b/tests/run/unroll-genericMethod-integration/UnrollTestMain_1.scala similarity index 85% rename from sbt-test/unroll-annot/classMethod/v1_app/src/main/scala/UnrollTestMain.scala rename to tests/run/unroll-genericMethod-integration/UnrollTestMain_1.scala index f36e9dd07fed..62d61c81d21d 100644 --- a/sbt-test/unroll-annot/classMethod/v1_app/src/main/scala/UnrollTestMain.scala +++ b/tests/run/unroll-genericMethod-integration/UnrollTestMain_1.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith diff --git a/sbt-test/unroll-annot/genericMethod/v2_app/src/main/scala/UnrollTestMain.scala b/tests/run/unroll-genericMethod-integration/UnrollTestMain_2.scala similarity index 91% rename from sbt-test/unroll-annot/genericMethod/v2_app/src/main/scala/UnrollTestMain.scala rename to tests/run/unroll-genericMethod-integration/UnrollTestMain_2.scala index 91b54aa9742c..921ee48ff0db 100644 --- a/sbt-test/unroll-annot/genericMethod/v2_app/src/main/scala/UnrollTestMain.scala +++ b/tests/run/unroll-genericMethod-integration/UnrollTestMain_2.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith diff --git a/sbt-test/unroll-annot/classMethod/v3_app/src/main/scala/UnrollTestMain.scala b/tests/run/unroll-genericMethod-integration/UnrollTestMain_3.scala similarity index 93% rename from sbt-test/unroll-annot/classMethod/v3_app/src/main/scala/UnrollTestMain.scala rename to tests/run/unroll-genericMethod-integration/UnrollTestMain_3.scala index 9a6daa3a9210..bc985b58c359 100644 --- a/sbt-test/unroll-annot/classMethod/v3_app/src/main/scala/UnrollTestMain.scala +++ b/tests/run/unroll-genericMethod-integration/UnrollTestMain_3.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith diff --git a/sbt-test/unroll-annot/genericMethod/v3_app/src/main/scala/UnrollTestPlatformSpecific.scala b/tests/run/unroll-genericMethod-integration/UnrollTestPlatformSpecific_3.scala similarity index 93% rename from sbt-test/unroll-annot/genericMethod/v3_app/src/main/scala/UnrollTestPlatformSpecific.scala rename to tests/run/unroll-genericMethod-integration/UnrollTestPlatformSpecific_3.scala index 7e2e913ea1f6..d5310b3e302b 100644 --- a/sbt-test/unroll-annot/genericMethod/v3_app/src/main/scala/UnrollTestPlatformSpecific.scala +++ b/tests/run/unroll-genericMethod-integration/UnrollTestPlatformSpecific_3.scala @@ -1,3 +1,5 @@ +//> using options -experimental +// scalajs: --skip package unroll object UnrollTestPlatformSpecificV3{ @@ -24,4 +26,4 @@ object UnrollTestPlatformSpecificV3{ cls.getMethods.filter(_.getName.contains("foo")).foreach(println) } -} \ No newline at end of file +} diff --git a/sbt-test/unroll-annot/genericMethod/v1/src/main/scala/Unrolled.scala b/tests/run/unroll-genericMethod-integration/Unrolled_1.scala similarity index 67% rename from sbt-test/unroll-annot/genericMethod/v1/src/main/scala/Unrolled.scala rename to tests/run/unroll-genericMethod-integration/Unrolled_1.scala index 3f14c4f31544..a1d69945bc7e 100644 --- a/sbt-test/unroll-annot/genericMethod/v1/src/main/scala/Unrolled.scala +++ b/tests/run/unroll-genericMethod-integration/Unrolled_1.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll class Unrolled{ diff --git a/sbt-test/unroll-annot/genericMethod/v2/src/main/scala/Unrolled.scala b/tests/run/unroll-genericMethod-integration/Unrolled_2.scala similarity index 82% rename from sbt-test/unroll-annot/genericMethod/v2/src/main/scala/Unrolled.scala rename to tests/run/unroll-genericMethod-integration/Unrolled_2.scala index 191a4df184ef..e5970388fff8 100644 --- a/sbt-test/unroll-annot/genericMethod/v2/src/main/scala/Unrolled.scala +++ b/tests/run/unroll-genericMethod-integration/Unrolled_2.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import scala.annotation.unroll diff --git a/sbt-test/unroll-annot/genericMethod/v3/src/main/scala/Unrolled.scala b/tests/run/unroll-genericMethod-integration/Unrolled_3.scala similarity index 84% rename from sbt-test/unroll-annot/genericMethod/v3/src/main/scala/Unrolled.scala rename to tests/run/unroll-genericMethod-integration/Unrolled_3.scala index 0c4909948a24..2ababa300ed1 100644 --- a/sbt-test/unroll-annot/genericMethod/v3/src/main/scala/Unrolled.scala +++ b/tests/run/unroll-genericMethod-integration/Unrolled_3.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import scala.annotation.unroll diff --git a/tests/run/unroll-methodWithImplicit-integration/TestUtils_1.scala b/tests/run/unroll-methodWithImplicit-integration/TestUtils_1.scala new file mode 100644 index 000000000000..e639a54d924b --- /dev/null +++ b/tests/run/unroll-methodWithImplicit-integration/TestUtils_1.scala @@ -0,0 +1,13 @@ +//> using options -experimental +package unroll + +object TestUtils { + def logAssertStartsWith(actual: String, expected: String): Unit = { + assert(actual.startsWith(expected)) + val suffix = { + val suffix0 = actual.stripPrefix(expected) + if (suffix0.isEmpty) "" else s""" + "$suffix0"""" + } + println(s"""Assertion passed: found "$expected"$suffix""") + } +} diff --git a/tests/run/unroll-methodWithImplicit-integration/Test_4.scala b/tests/run/unroll-methodWithImplicit-integration/Test_4.scala new file mode 100644 index 000000000000..cae956f8b1bf --- /dev/null +++ b/tests/run/unroll-methodWithImplicit-integration/Test_4.scala @@ -0,0 +1,8 @@ +//> using options -experimental +// scalajs: --skip +import unroll.* + +@main def Test: Unit = + UnrollTestMainV1.main(Array.empty[String]) + UnrollTestMainV2.main(Array.empty[String]) + UnrollTestMainV3.main(Array.empty[String]) diff --git a/sbt-test/unroll-annot/methodWithImplicit/v1_app/src/main/scala/UnrollTestMain.scala b/tests/run/unroll-methodWithImplicit-integration/UnrollTestMain_1.scala similarity index 87% rename from sbt-test/unroll-annot/methodWithImplicit/v1_app/src/main/scala/UnrollTestMain.scala rename to tests/run/unroll-methodWithImplicit-integration/UnrollTestMain_1.scala index 928a74f57d5e..e4e91e6709f3 100644 --- a/sbt-test/unroll-annot/methodWithImplicit/v1_app/src/main/scala/UnrollTestMain.scala +++ b/tests/run/unroll-methodWithImplicit-integration/UnrollTestMain_1.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith diff --git a/sbt-test/unroll-annot/methodWithImplicit/v2_app/src/main/scala/UnrollTestMain.scala b/tests/run/unroll-methodWithImplicit-integration/UnrollTestMain_2.scala similarity index 92% rename from sbt-test/unroll-annot/methodWithImplicit/v2_app/src/main/scala/UnrollTestMain.scala rename to tests/run/unroll-methodWithImplicit-integration/UnrollTestMain_2.scala index de14613be3cc..69a5a0b39ab6 100644 --- a/sbt-test/unroll-annot/methodWithImplicit/v2_app/src/main/scala/UnrollTestMain.scala +++ b/tests/run/unroll-methodWithImplicit-integration/UnrollTestMain_2.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith diff --git a/sbt-test/unroll-annot/methodWithImplicit/v3_app/src/main/scala/UnrollTestMain.scala b/tests/run/unroll-methodWithImplicit-integration/UnrollTestMain_3.scala similarity index 93% rename from sbt-test/unroll-annot/methodWithImplicit/v3_app/src/main/scala/UnrollTestMain.scala rename to tests/run/unroll-methodWithImplicit-integration/UnrollTestMain_3.scala index 1982d7dff344..ffd528e15f5e 100644 --- a/sbt-test/unroll-annot/methodWithImplicit/v3_app/src/main/scala/UnrollTestMain.scala +++ b/tests/run/unroll-methodWithImplicit-integration/UnrollTestMain_3.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith diff --git a/sbt-test/unroll-annot/methodWithImplicit/v3_app/src/main/scala/UnrollTestPlatformSpecific.scala b/tests/run/unroll-methodWithImplicit-integration/UnrollTestPlatformSpecific_3.scala similarity index 94% rename from sbt-test/unroll-annot/methodWithImplicit/v3_app/src/main/scala/UnrollTestPlatformSpecific.scala rename to tests/run/unroll-methodWithImplicit-integration/UnrollTestPlatformSpecific_3.scala index 3537a6373e0d..431c1e7c2d4c 100644 --- a/sbt-test/unroll-annot/methodWithImplicit/v3_app/src/main/scala/UnrollTestPlatformSpecific.scala +++ b/tests/run/unroll-methodWithImplicit-integration/UnrollTestPlatformSpecific_3.scala @@ -1,3 +1,5 @@ +//> using options -experimental +// scalajs: --skip package unroll object UnrollTestPlatformSpecificV3{ @@ -11,7 +13,7 @@ object UnrollTestPlatformSpecificV3{ ) assert(scala.util.Try(cls.getMethod("foo", classOf[String], classOf[Int], classOf[String => String])).isFailure) - + assert( cls.getMethod("foo", classOf[String], classOf[Int], classOf[Boolean], classOf[String => String]) .invoke(instance, "hello", 2: Integer, java.lang.Boolean.FALSE, identity[String](_)) == @@ -26,4 +28,4 @@ object UnrollTestPlatformSpecificV3{ cls.getMethods.filter(_.getName.contains("foo")).foreach(println) } -} \ No newline at end of file +} diff --git a/sbt-test/unroll-annot/methodWithImplicit/v1/src/main/scala/Unrolled.scala b/tests/run/unroll-methodWithImplicit-integration/Unrolled_1.scala similarity index 74% rename from sbt-test/unroll-annot/methodWithImplicit/v1/src/main/scala/Unrolled.scala rename to tests/run/unroll-methodWithImplicit-integration/Unrolled_1.scala index 44137480e239..1de415b26952 100644 --- a/sbt-test/unroll-annot/methodWithImplicit/v1/src/main/scala/Unrolled.scala +++ b/tests/run/unroll-methodWithImplicit-integration/Unrolled_1.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll class Unrolled{ diff --git a/sbt-test/unroll-annot/methodWithImplicit/v2/src/main/scala/Unrolled.scala b/tests/run/unroll-methodWithImplicit-integration/Unrolled_2.scala similarity index 84% rename from sbt-test/unroll-annot/methodWithImplicit/v2/src/main/scala/Unrolled.scala rename to tests/run/unroll-methodWithImplicit-integration/Unrolled_2.scala index b2bf28bfb1db..01a5d2fb037a 100644 --- a/sbt-test/unroll-annot/methodWithImplicit/v2/src/main/scala/Unrolled.scala +++ b/tests/run/unroll-methodWithImplicit-integration/Unrolled_2.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import scala.annotation.unroll diff --git a/sbt-test/unroll-annot/methodWithImplicit/v3/src/main/scala/Unrolled.scala b/tests/run/unroll-methodWithImplicit-integration/Unrolled_3.scala similarity index 86% rename from sbt-test/unroll-annot/methodWithImplicit/v3/src/main/scala/Unrolled.scala rename to tests/run/unroll-methodWithImplicit-integration/Unrolled_3.scala index fee831cef37f..07627f604d76 100644 --- a/sbt-test/unroll-annot/methodWithImplicit/v3/src/main/scala/Unrolled.scala +++ b/tests/run/unroll-methodWithImplicit-integration/Unrolled_3.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import scala.annotation.unroll diff --git a/tests/run/unroll-objectMethod-integration/TestUtils_1.scala b/tests/run/unroll-objectMethod-integration/TestUtils_1.scala new file mode 100644 index 000000000000..e639a54d924b --- /dev/null +++ b/tests/run/unroll-objectMethod-integration/TestUtils_1.scala @@ -0,0 +1,13 @@ +//> using options -experimental +package unroll + +object TestUtils { + def logAssertStartsWith(actual: String, expected: String): Unit = { + assert(actual.startsWith(expected)) + val suffix = { + val suffix0 = actual.stripPrefix(expected) + if (suffix0.isEmpty) "" else s""" + "$suffix0"""" + } + println(s"""Assertion passed: found "$expected"$suffix""") + } +} diff --git a/tests/run/unroll-objectMethod-integration/Test_4.scala b/tests/run/unroll-objectMethod-integration/Test_4.scala new file mode 100644 index 000000000000..cae956f8b1bf --- /dev/null +++ b/tests/run/unroll-objectMethod-integration/Test_4.scala @@ -0,0 +1,8 @@ +//> using options -experimental +// scalajs: --skip +import unroll.* + +@main def Test: Unit = + UnrollTestMainV1.main(Array.empty[String]) + UnrollTestMainV2.main(Array.empty[String]) + UnrollTestMainV3.main(Array.empty[String]) diff --git a/sbt-test/unroll-annot/objectMethod/v1_app/src/main/scala/UnrollTestMain.scala b/tests/run/unroll-objectMethod-integration/UnrollTestMain_1.scala similarity index 88% rename from sbt-test/unroll-annot/objectMethod/v1_app/src/main/scala/UnrollTestMain.scala rename to tests/run/unroll-objectMethod-integration/UnrollTestMain_1.scala index 23f8e15b40cb..9cba53c444ce 100644 --- a/sbt-test/unroll-annot/objectMethod/v1_app/src/main/scala/UnrollTestMain.scala +++ b/tests/run/unroll-objectMethod-integration/UnrollTestMain_1.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith diff --git a/sbt-test/unroll-annot/objectMethod/v2_app/src/main/scala/UnrollTestMain.scala b/tests/run/unroll-objectMethod-integration/UnrollTestMain_2.scala similarity index 90% rename from sbt-test/unroll-annot/objectMethod/v2_app/src/main/scala/UnrollTestMain.scala rename to tests/run/unroll-objectMethod-integration/UnrollTestMain_2.scala index ee5337bd4689..2fe609543d51 100644 --- a/sbt-test/unroll-annot/objectMethod/v2_app/src/main/scala/UnrollTestMain.scala +++ b/tests/run/unroll-objectMethod-integration/UnrollTestMain_2.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith diff --git a/sbt-test/unroll-annot/objectMethod/v3_app/src/main/scala/UnrollTestMain.scala b/tests/run/unroll-objectMethod-integration/UnrollTestMain_3.scala similarity index 93% rename from sbt-test/unroll-annot/objectMethod/v3_app/src/main/scala/UnrollTestMain.scala rename to tests/run/unroll-objectMethod-integration/UnrollTestMain_3.scala index b1996bd6d5d7..e6d442d3bf7c 100644 --- a/sbt-test/unroll-annot/objectMethod/v3_app/src/main/scala/UnrollTestMain.scala +++ b/tests/run/unroll-objectMethod-integration/UnrollTestMain_3.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith diff --git a/sbt-test/unroll-annot/objectMethod/v3_app/src/main/scala/UnrollTestPlatformSpecific.scala b/tests/run/unroll-objectMethod-integration/UnrollTestPlatformSpecific_3.scala similarity index 97% rename from sbt-test/unroll-annot/objectMethod/v3_app/src/main/scala/UnrollTestPlatformSpecific.scala rename to tests/run/unroll-objectMethod-integration/UnrollTestPlatformSpecific_3.scala index 2b5578dd482d..6f399649b4b8 100644 --- a/sbt-test/unroll-annot/objectMethod/v3_app/src/main/scala/UnrollTestPlatformSpecific.scala +++ b/tests/run/unroll-objectMethod-integration/UnrollTestPlatformSpecific_3.scala @@ -1,3 +1,5 @@ +//> using options -experimental +// scalajs: --skip package unroll object UnrollTestPlatformSpecificV3{ @@ -45,4 +47,4 @@ object UnrollTestPlatformSpecificV3{ ) } -} \ No newline at end of file +} diff --git a/sbt-test/unroll-annot/objectMethod/v1/src/main/scala/Unrolled.scala b/tests/run/unroll-objectMethod-integration/Unrolled_1.scala similarity index 70% rename from sbt-test/unroll-annot/objectMethod/v1/src/main/scala/Unrolled.scala rename to tests/run/unroll-objectMethod-integration/Unrolled_1.scala index f4559bc2a820..042ab3180cdc 100644 --- a/sbt-test/unroll-annot/objectMethod/v1/src/main/scala/Unrolled.scala +++ b/tests/run/unroll-objectMethod-integration/Unrolled_1.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll object Unrolled{ diff --git a/sbt-test/unroll-annot/objectMethod/v2/src/main/scala/Unrolled.scala b/tests/run/unroll-objectMethod-integration/Unrolled_2.scala similarity index 81% rename from sbt-test/unroll-annot/objectMethod/v2/src/main/scala/Unrolled.scala rename to tests/run/unroll-objectMethod-integration/Unrolled_2.scala index c72097c2288c..bfef86beb6b2 100644 --- a/sbt-test/unroll-annot/objectMethod/v2/src/main/scala/Unrolled.scala +++ b/tests/run/unroll-objectMethod-integration/Unrolled_2.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import scala.annotation.unroll diff --git a/sbt-test/unroll-annot/objectMethod/v3/src/main/scala/Unrolled.scala b/tests/run/unroll-objectMethod-integration/Unrolled_3.scala similarity index 84% rename from sbt-test/unroll-annot/objectMethod/v3/src/main/scala/Unrolled.scala rename to tests/run/unroll-objectMethod-integration/Unrolled_3.scala index 3491b42e95ef..c76521e731d8 100644 --- a/sbt-test/unroll-annot/objectMethod/v3/src/main/scala/Unrolled.scala +++ b/tests/run/unroll-objectMethod-integration/Unrolled_3.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import scala.annotation.unroll diff --git a/tests/run/unroll-primaryConstructor-integration/TestUtils_1.scala b/tests/run/unroll-primaryConstructor-integration/TestUtils_1.scala new file mode 100644 index 000000000000..e639a54d924b --- /dev/null +++ b/tests/run/unroll-primaryConstructor-integration/TestUtils_1.scala @@ -0,0 +1,13 @@ +//> using options -experimental +package unroll + +object TestUtils { + def logAssertStartsWith(actual: String, expected: String): Unit = { + assert(actual.startsWith(expected)) + val suffix = { + val suffix0 = actual.stripPrefix(expected) + if (suffix0.isEmpty) "" else s""" + "$suffix0"""" + } + println(s"""Assertion passed: found "$expected"$suffix""") + } +} diff --git a/tests/run/unroll-primaryConstructor-integration/Test_4.scala b/tests/run/unroll-primaryConstructor-integration/Test_4.scala new file mode 100644 index 000000000000..cae956f8b1bf --- /dev/null +++ b/tests/run/unroll-primaryConstructor-integration/Test_4.scala @@ -0,0 +1,8 @@ +//> using options -experimental +// scalajs: --skip +import unroll.* + +@main def Test: Unit = + UnrollTestMainV1.main(Array.empty[String]) + UnrollTestMainV2.main(Array.empty[String]) + UnrollTestMainV3.main(Array.empty[String]) diff --git a/sbt-test/unroll-annot/primaryConstructor/v1_app/src/main/scala/UnrollTestMain.scala b/tests/run/unroll-primaryConstructor-integration/UnrollTestMain_1.scala similarity index 88% rename from sbt-test/unroll-annot/primaryConstructor/v1_app/src/main/scala/UnrollTestMain.scala rename to tests/run/unroll-primaryConstructor-integration/UnrollTestMain_1.scala index 9bed955a9bc8..ac80b2a5734b 100644 --- a/sbt-test/unroll-annot/primaryConstructor/v1_app/src/main/scala/UnrollTestMain.scala +++ b/tests/run/unroll-primaryConstructor-integration/UnrollTestMain_1.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith diff --git a/sbt-test/unroll-annot/secondaryConstructor/v2_app/src/main/scala/UnrollTestMain.scala b/tests/run/unroll-primaryConstructor-integration/UnrollTestMain_2.scala similarity index 91% rename from sbt-test/unroll-annot/secondaryConstructor/v2_app/src/main/scala/UnrollTestMain.scala rename to tests/run/unroll-primaryConstructor-integration/UnrollTestMain_2.scala index 7a88d263a213..5140d999ee9b 100644 --- a/sbt-test/unroll-annot/secondaryConstructor/v2_app/src/main/scala/UnrollTestMain.scala +++ b/tests/run/unroll-primaryConstructor-integration/UnrollTestMain_2.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith diff --git a/sbt-test/unroll-annot/secondaryConstructor/v3_app/src/main/scala/UnrollTestMain.scala b/tests/run/unroll-primaryConstructor-integration/UnrollTestMain_3.scala similarity index 93% rename from sbt-test/unroll-annot/secondaryConstructor/v3_app/src/main/scala/UnrollTestMain.scala rename to tests/run/unroll-primaryConstructor-integration/UnrollTestMain_3.scala index f05ca8808c3d..c80c33672d3e 100644 --- a/sbt-test/unroll-annot/secondaryConstructor/v3_app/src/main/scala/UnrollTestMain.scala +++ b/tests/run/unroll-primaryConstructor-integration/UnrollTestMain_3.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith diff --git a/sbt-test/unroll-annot/secondaryConstructor/v3_app/src/main/scala/UnrollTestPlatformSpecific.scala b/tests/run/unroll-primaryConstructor-integration/UnrollTestPlatformSpecific_3.scala similarity index 94% rename from sbt-test/unroll-annot/secondaryConstructor/v3_app/src/main/scala/UnrollTestPlatformSpecific.scala rename to tests/run/unroll-primaryConstructor-integration/UnrollTestPlatformSpecific_3.scala index 07dee69cd8a7..e06a38502c62 100644 --- a/sbt-test/unroll-annot/secondaryConstructor/v3_app/src/main/scala/UnrollTestPlatformSpecific.scala +++ b/tests/run/unroll-primaryConstructor-integration/UnrollTestPlatformSpecific_3.scala @@ -1,3 +1,5 @@ +//> using options -experimental +// scalajs: --skip package unroll object UnrollTestPlatformSpecificV3{ @@ -30,4 +32,4 @@ object UnrollTestPlatformSpecificV3{ cls.getConstructors.foreach(println) } -} \ No newline at end of file +} diff --git a/sbt-test/unroll-annot/primaryConstructor/v1/src/main/scala/Unrolled.scala b/tests/run/unroll-primaryConstructor-integration/Unrolled_1.scala similarity index 70% rename from sbt-test/unroll-annot/primaryConstructor/v1/src/main/scala/Unrolled.scala rename to tests/run/unroll-primaryConstructor-integration/Unrolled_1.scala index c7574f4346e0..0ddd25a70127 100644 --- a/sbt-test/unroll-annot/primaryConstructor/v1/src/main/scala/Unrolled.scala +++ b/tests/run/unroll-primaryConstructor-integration/Unrolled_1.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll class Unrolled(s: String, n: Int = 1){ diff --git a/sbt-test/unroll-annot/primaryConstructor/v2/src/main/scala/Unrolled.scala b/tests/run/unroll-primaryConstructor-integration/Unrolled_2.scala similarity index 81% rename from sbt-test/unroll-annot/primaryConstructor/v2/src/main/scala/Unrolled.scala rename to tests/run/unroll-primaryConstructor-integration/Unrolled_2.scala index 40bf19a16901..c8558df1af55 100644 --- a/sbt-test/unroll-annot/primaryConstructor/v2/src/main/scala/Unrolled.scala +++ b/tests/run/unroll-primaryConstructor-integration/Unrolled_2.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import scala.annotation.unroll diff --git a/sbt-test/unroll-annot/primaryConstructor/v3/src/main/scala/Unrolled.scala b/tests/run/unroll-primaryConstructor-integration/Unrolled_3.scala similarity index 83% rename from sbt-test/unroll-annot/primaryConstructor/v3/src/main/scala/Unrolled.scala rename to tests/run/unroll-primaryConstructor-integration/Unrolled_3.scala index b570bcaadbb3..c6be439e1dec 100644 --- a/sbt-test/unroll-annot/primaryConstructor/v3/src/main/scala/Unrolled.scala +++ b/tests/run/unroll-primaryConstructor-integration/Unrolled_3.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import scala.annotation.unroll diff --git a/tests/run/unroll-secondParameterList-integration/TestUtils_1.scala b/tests/run/unroll-secondParameterList-integration/TestUtils_1.scala new file mode 100644 index 000000000000..e639a54d924b --- /dev/null +++ b/tests/run/unroll-secondParameterList-integration/TestUtils_1.scala @@ -0,0 +1,13 @@ +//> using options -experimental +package unroll + +object TestUtils { + def logAssertStartsWith(actual: String, expected: String): Unit = { + assert(actual.startsWith(expected)) + val suffix = { + val suffix0 = actual.stripPrefix(expected) + if (suffix0.isEmpty) "" else s""" + "$suffix0"""" + } + println(s"""Assertion passed: found "$expected"$suffix""") + } +} diff --git a/tests/run/unroll-secondParameterList-integration/Test_4.scala b/tests/run/unroll-secondParameterList-integration/Test_4.scala new file mode 100644 index 000000000000..cae956f8b1bf --- /dev/null +++ b/tests/run/unroll-secondParameterList-integration/Test_4.scala @@ -0,0 +1,8 @@ +//> using options -experimental +// scalajs: --skip +import unroll.* + +@main def Test: Unit = + UnrollTestMainV1.main(Array.empty[String]) + UnrollTestMainV2.main(Array.empty[String]) + UnrollTestMainV3.main(Array.empty[String]) diff --git a/sbt-test/unroll-annot/secondParameterList/v1_app/src/main/scala/UnrollTestMain.scala b/tests/run/unroll-secondParameterList-integration/UnrollTestMain_1.scala similarity index 86% rename from sbt-test/unroll-annot/secondParameterList/v1_app/src/main/scala/UnrollTestMain.scala rename to tests/run/unroll-secondParameterList-integration/UnrollTestMain_1.scala index ef6fd3b68102..163225fb93bf 100644 --- a/sbt-test/unroll-annot/secondParameterList/v1_app/src/main/scala/UnrollTestMain.scala +++ b/tests/run/unroll-secondParameterList-integration/UnrollTestMain_1.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith diff --git a/sbt-test/unroll-annot/secondParameterList/v2_app/src/main/scala/UnrollTestMain.scala b/tests/run/unroll-secondParameterList-integration/UnrollTestMain_2.scala similarity index 91% rename from sbt-test/unroll-annot/secondParameterList/v2_app/src/main/scala/UnrollTestMain.scala rename to tests/run/unroll-secondParameterList-integration/UnrollTestMain_2.scala index 09c06869f617..de0776c569db 100644 --- a/sbt-test/unroll-annot/secondParameterList/v2_app/src/main/scala/UnrollTestMain.scala +++ b/tests/run/unroll-secondParameterList-integration/UnrollTestMain_2.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith diff --git a/sbt-test/unroll-annot/secondParameterList/v3_app/src/main/scala/UnrollTestMain.scala b/tests/run/unroll-secondParameterList-integration/UnrollTestMain_3.scala similarity index 93% rename from sbt-test/unroll-annot/secondParameterList/v3_app/src/main/scala/UnrollTestMain.scala rename to tests/run/unroll-secondParameterList-integration/UnrollTestMain_3.scala index 468f24956d94..b18a7f18b4d0 100644 --- a/sbt-test/unroll-annot/secondParameterList/v3_app/src/main/scala/UnrollTestMain.scala +++ b/tests/run/unroll-secondParameterList-integration/UnrollTestMain_3.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith diff --git a/sbt-test/unroll-annot/secondParameterList/v3_app/src/main/scala/UnrollTestPlatformSpecific.scala b/tests/run/unroll-secondParameterList-integration/UnrollTestPlatformSpecific_3.scala similarity index 95% rename from sbt-test/unroll-annot/secondParameterList/v3_app/src/main/scala/UnrollTestPlatformSpecific.scala rename to tests/run/unroll-secondParameterList-integration/UnrollTestPlatformSpecific_3.scala index 4663b2220cd7..49dff864f49b 100644 --- a/sbt-test/unroll-annot/secondParameterList/v3_app/src/main/scala/UnrollTestPlatformSpecific.scala +++ b/tests/run/unroll-secondParameterList-integration/UnrollTestPlatformSpecific_3.scala @@ -1,3 +1,5 @@ +//> using options -experimental +// scalajs: --skip package unroll object UnrollTestPlatformSpecificV3{ @@ -27,4 +29,4 @@ object UnrollTestPlatformSpecificV3{ cls.getMethods.filter(_.getName.contains("foo")).foreach(println) } -} \ No newline at end of file +} diff --git a/sbt-test/unroll-annot/secondParameterList/v1/src/main/scala/Unrolled.scala b/tests/run/unroll-secondParameterList-integration/Unrolled_1.scala similarity index 72% rename from sbt-test/unroll-annot/secondParameterList/v1/src/main/scala/Unrolled.scala rename to tests/run/unroll-secondParameterList-integration/Unrolled_1.scala index f9ddac201c59..fbe0a58dca24 100644 --- a/sbt-test/unroll-annot/secondParameterList/v1/src/main/scala/Unrolled.scala +++ b/tests/run/unroll-secondParameterList-integration/Unrolled_1.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll class Unrolled{ diff --git a/sbt-test/unroll-annot/secondParameterList/v2/src/main/scala/Unrolled.scala b/tests/run/unroll-secondParameterList-integration/Unrolled_2.scala similarity index 84% rename from sbt-test/unroll-annot/secondParameterList/v2/src/main/scala/Unrolled.scala rename to tests/run/unroll-secondParameterList-integration/Unrolled_2.scala index 73f635b24545..68c4170f6f6e 100644 --- a/sbt-test/unroll-annot/secondParameterList/v2/src/main/scala/Unrolled.scala +++ b/tests/run/unroll-secondParameterList-integration/Unrolled_2.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import scala.annotation.unroll diff --git a/sbt-test/unroll-annot/secondParameterList/v3/src/main/scala/Unrolled.scala b/tests/run/unroll-secondParameterList-integration/Unrolled_3.scala similarity index 85% rename from sbt-test/unroll-annot/secondParameterList/v3/src/main/scala/Unrolled.scala rename to tests/run/unroll-secondParameterList-integration/Unrolled_3.scala index a903fbed4d93..ddbe8c4cfaf4 100644 --- a/sbt-test/unroll-annot/secondParameterList/v3/src/main/scala/Unrolled.scala +++ b/tests/run/unroll-secondParameterList-integration/Unrolled_3.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import scala.annotation.unroll diff --git a/tests/run/unroll-secondaryConstructor-integration/TestUtils_1.scala b/tests/run/unroll-secondaryConstructor-integration/TestUtils_1.scala new file mode 100644 index 000000000000..e639a54d924b --- /dev/null +++ b/tests/run/unroll-secondaryConstructor-integration/TestUtils_1.scala @@ -0,0 +1,13 @@ +//> using options -experimental +package unroll + +object TestUtils { + def logAssertStartsWith(actual: String, expected: String): Unit = { + assert(actual.startsWith(expected)) + val suffix = { + val suffix0 = actual.stripPrefix(expected) + if (suffix0.isEmpty) "" else s""" + "$suffix0"""" + } + println(s"""Assertion passed: found "$expected"$suffix""") + } +} diff --git a/tests/run/unroll-secondaryConstructor-integration/Test_4.scala b/tests/run/unroll-secondaryConstructor-integration/Test_4.scala new file mode 100644 index 000000000000..cae956f8b1bf --- /dev/null +++ b/tests/run/unroll-secondaryConstructor-integration/Test_4.scala @@ -0,0 +1,8 @@ +//> using options -experimental +// scalajs: --skip +import unroll.* + +@main def Test: Unit = + UnrollTestMainV1.main(Array.empty[String]) + UnrollTestMainV2.main(Array.empty[String]) + UnrollTestMainV3.main(Array.empty[String]) diff --git a/sbt-test/unroll-annot/secondaryConstructor/v1_app/src/main/scala/UnrollTestMain.scala b/tests/run/unroll-secondaryConstructor-integration/UnrollTestMain_1.scala similarity index 88% rename from sbt-test/unroll-annot/secondaryConstructor/v1_app/src/main/scala/UnrollTestMain.scala rename to tests/run/unroll-secondaryConstructor-integration/UnrollTestMain_1.scala index 9bed955a9bc8..ac80b2a5734b 100644 --- a/sbt-test/unroll-annot/secondaryConstructor/v1_app/src/main/scala/UnrollTestMain.scala +++ b/tests/run/unroll-secondaryConstructor-integration/UnrollTestMain_1.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith diff --git a/sbt-test/unroll-annot/primaryConstructor/v2_app/src/main/scala/UnrollTestMain.scala b/tests/run/unroll-secondaryConstructor-integration/UnrollTestMain_2.scala similarity index 91% rename from sbt-test/unroll-annot/primaryConstructor/v2_app/src/main/scala/UnrollTestMain.scala rename to tests/run/unroll-secondaryConstructor-integration/UnrollTestMain_2.scala index 7a88d263a213..5140d999ee9b 100644 --- a/sbt-test/unroll-annot/primaryConstructor/v2_app/src/main/scala/UnrollTestMain.scala +++ b/tests/run/unroll-secondaryConstructor-integration/UnrollTestMain_2.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith diff --git a/sbt-test/unroll-annot/primaryConstructor/v3_app/src/main/scala/UnrollTestMain.scala b/tests/run/unroll-secondaryConstructor-integration/UnrollTestMain_3.scala similarity index 93% rename from sbt-test/unroll-annot/primaryConstructor/v3_app/src/main/scala/UnrollTestMain.scala rename to tests/run/unroll-secondaryConstructor-integration/UnrollTestMain_3.scala index f05ca8808c3d..c80c33672d3e 100644 --- a/sbt-test/unroll-annot/primaryConstructor/v3_app/src/main/scala/UnrollTestMain.scala +++ b/tests/run/unroll-secondaryConstructor-integration/UnrollTestMain_3.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith diff --git a/sbt-test/unroll-annot/primaryConstructor/v3_app/src/main/scala/UnrollTestPlatformSpecific.scala b/tests/run/unroll-secondaryConstructor-integration/UnrollTestPlatformSpecific_3.scala similarity index 94% rename from sbt-test/unroll-annot/primaryConstructor/v3_app/src/main/scala/UnrollTestPlatformSpecific.scala rename to tests/run/unroll-secondaryConstructor-integration/UnrollTestPlatformSpecific_3.scala index 07dee69cd8a7..e06a38502c62 100644 --- a/sbt-test/unroll-annot/primaryConstructor/v3_app/src/main/scala/UnrollTestPlatformSpecific.scala +++ b/tests/run/unroll-secondaryConstructor-integration/UnrollTestPlatformSpecific_3.scala @@ -1,3 +1,5 @@ +//> using options -experimental +// scalajs: --skip package unroll object UnrollTestPlatformSpecificV3{ @@ -30,4 +32,4 @@ object UnrollTestPlatformSpecificV3{ cls.getConstructors.foreach(println) } -} \ No newline at end of file +} diff --git a/sbt-test/unroll-annot/secondaryConstructor/v1/src/main/scala/Unrolled.scala b/tests/run/unroll-secondaryConstructor-integration/Unrolled_1.scala similarity index 78% rename from sbt-test/unroll-annot/secondaryConstructor/v1/src/main/scala/Unrolled.scala rename to tests/run/unroll-secondaryConstructor-integration/Unrolled_1.scala index 529a3fc66de3..855b20efa8f6 100644 --- a/sbt-test/unroll-annot/secondaryConstructor/v1/src/main/scala/Unrolled.scala +++ b/tests/run/unroll-secondaryConstructor-integration/Unrolled_1.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll class Unrolled(){ diff --git a/sbt-test/unroll-annot/secondaryConstructor/v2/src/main/scala/Unrolled.scala b/tests/run/unroll-secondaryConstructor-integration/Unrolled_2.scala similarity index 85% rename from sbt-test/unroll-annot/secondaryConstructor/v2/src/main/scala/Unrolled.scala rename to tests/run/unroll-secondaryConstructor-integration/Unrolled_2.scala index 382066698f31..b8f1f4f28328 100644 --- a/sbt-test/unroll-annot/secondaryConstructor/v2/src/main/scala/Unrolled.scala +++ b/tests/run/unroll-secondaryConstructor-integration/Unrolled_2.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import scala.annotation.unroll diff --git a/sbt-test/unroll-annot/secondaryConstructor/v3/src/main/scala/Unrolled.scala b/tests/run/unroll-secondaryConstructor-integration/Unrolled_3.scala similarity index 86% rename from sbt-test/unroll-annot/secondaryConstructor/v3/src/main/scala/Unrolled.scala rename to tests/run/unroll-secondaryConstructor-integration/Unrolled_3.scala index 89411d6576ca..1da3e0d69ec6 100644 --- a/sbt-test/unroll-annot/secondaryConstructor/v3/src/main/scala/Unrolled.scala +++ b/tests/run/unroll-secondaryConstructor-integration/Unrolled_3.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import scala.annotation.unroll diff --git a/tests/run/unroll-traitMethod-integration/TestUtils_1.scala b/tests/run/unroll-traitMethod-integration/TestUtils_1.scala new file mode 100644 index 000000000000..e639a54d924b --- /dev/null +++ b/tests/run/unroll-traitMethod-integration/TestUtils_1.scala @@ -0,0 +1,13 @@ +//> using options -experimental +package unroll + +object TestUtils { + def logAssertStartsWith(actual: String, expected: String): Unit = { + assert(actual.startsWith(expected)) + val suffix = { + val suffix0 = actual.stripPrefix(expected) + if (suffix0.isEmpty) "" else s""" + "$suffix0"""" + } + println(s"""Assertion passed: found "$expected"$suffix""") + } +} diff --git a/tests/run/unroll-traitMethod-integration/Test_4.scala b/tests/run/unroll-traitMethod-integration/Test_4.scala new file mode 100644 index 000000000000..cae956f8b1bf --- /dev/null +++ b/tests/run/unroll-traitMethod-integration/Test_4.scala @@ -0,0 +1,8 @@ +//> using options -experimental +// scalajs: --skip +import unroll.* + +@main def Test: Unit = + UnrollTestMainV1.main(Array.empty[String]) + UnrollTestMainV2.main(Array.empty[String]) + UnrollTestMainV3.main(Array.empty[String]) diff --git a/sbt-test/unroll-annot/traitMethod/v1_app/src/main/scala/UnrollTestMain.scala b/tests/run/unroll-traitMethod-integration/UnrollTestMain_1.scala similarity index 92% rename from sbt-test/unroll-annot/traitMethod/v1_app/src/main/scala/UnrollTestMain.scala rename to tests/run/unroll-traitMethod-integration/UnrollTestMain_1.scala index f1c7c8bb88a4..b290c95e1f9c 100644 --- a/sbt-test/unroll-annot/traitMethod/v1_app/src/main/scala/UnrollTestMain.scala +++ b/tests/run/unroll-traitMethod-integration/UnrollTestMain_1.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith diff --git a/sbt-test/unroll-annot/traitMethod/v2_app/src/main/scala/UnrollTestMain.scala b/tests/run/unroll-traitMethod-integration/UnrollTestMain_2.scala similarity index 94% rename from sbt-test/unroll-annot/traitMethod/v2_app/src/main/scala/UnrollTestMain.scala rename to tests/run/unroll-traitMethod-integration/UnrollTestMain_2.scala index 30eb52263e50..6721b302e3f1 100644 --- a/sbt-test/unroll-annot/traitMethod/v2_app/src/main/scala/UnrollTestMain.scala +++ b/tests/run/unroll-traitMethod-integration/UnrollTestMain_2.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith diff --git a/sbt-test/unroll-annot/traitMethod/v3_app/src/main/scala/UnrollTestMain.scala b/tests/run/unroll-traitMethod-integration/UnrollTestMain_3.scala similarity index 95% rename from sbt-test/unroll-annot/traitMethod/v3_app/src/main/scala/UnrollTestMain.scala rename to tests/run/unroll-traitMethod-integration/UnrollTestMain_3.scala index 89154b958161..d4091763a86f 100644 --- a/sbt-test/unroll-annot/traitMethod/v3_app/src/main/scala/UnrollTestMain.scala +++ b/tests/run/unroll-traitMethod-integration/UnrollTestMain_3.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import unroll.TestUtils.logAssertStartsWith diff --git a/sbt-test/unroll-annot/traitMethod/v3_app/src/main/scala/UnrollTestPlatformSpecific.scala b/tests/run/unroll-traitMethod-integration/UnrollTestPlatformSpecific_3.scala similarity index 94% rename from sbt-test/unroll-annot/traitMethod/v3_app/src/main/scala/UnrollTestPlatformSpecific.scala rename to tests/run/unroll-traitMethod-integration/UnrollTestPlatformSpecific_3.scala index e8367679233f..88b0e2255741 100644 --- a/sbt-test/unroll-annot/traitMethod/v3_app/src/main/scala/UnrollTestPlatformSpecific.scala +++ b/tests/run/unroll-traitMethod-integration/UnrollTestPlatformSpecific_3.scala @@ -1,3 +1,5 @@ +//> using options -experimental +// scalajs: --skip package unroll object UnrollTestPlatformSpecificV3{ @@ -25,4 +27,4 @@ object UnrollTestPlatformSpecificV3{ cls.getMethods.filter(_.getName.contains("foo")).foreach(println) } -} \ No newline at end of file +} diff --git a/sbt-test/unroll-annot/traitMethod/v1/src/main/scala/Unrolled.scala b/tests/run/unroll-traitMethod-integration/Unrolled_1.scala similarity index 77% rename from sbt-test/unroll-annot/traitMethod/v1/src/main/scala/Unrolled.scala rename to tests/run/unroll-traitMethod-integration/Unrolled_1.scala index eaadde758ac7..aa9375698103 100644 --- a/sbt-test/unroll-annot/traitMethod/v1/src/main/scala/Unrolled.scala +++ b/tests/run/unroll-traitMethod-integration/Unrolled_1.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll trait Unrolled{ diff --git a/sbt-test/unroll-annot/traitMethod/v2/src/main/scala/Unrolled.scala b/tests/run/unroll-traitMethod-integration/Unrolled_2.scala similarity index 84% rename from sbt-test/unroll-annot/traitMethod/v2/src/main/scala/Unrolled.scala rename to tests/run/unroll-traitMethod-integration/Unrolled_2.scala index d0bc2f595020..242054d41be4 100644 --- a/sbt-test/unroll-annot/traitMethod/v2/src/main/scala/Unrolled.scala +++ b/tests/run/unroll-traitMethod-integration/Unrolled_2.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import scala.annotation.unroll diff --git a/sbt-test/unroll-annot/traitMethod/v3/src/main/scala/Unrolled.scala b/tests/run/unroll-traitMethod-integration/Unrolled_3.scala similarity index 86% rename from sbt-test/unroll-annot/traitMethod/v3/src/main/scala/Unrolled.scala rename to tests/run/unroll-traitMethod-integration/Unrolled_3.scala index 4478d57a60f8..398ddbb4da22 100644 --- a/sbt-test/unroll-annot/traitMethod/v3/src/main/scala/Unrolled.scala +++ b/tests/run/unroll-traitMethod-integration/Unrolled_3.scala @@ -1,3 +1,4 @@ +//> using options -experimental package unroll import scala.annotation.unroll diff --git a/tests/warn/21681.check b/tests/warn/21681.check index adf3586e6e0b..5156a600d609 100644 --- a/tests/warn/21681.check +++ b/tests/warn/21681.check @@ -5,4 +5,3 @@ | not as an assignment. | | To assign a value, use curly braces: `{age = 29}`. - | This can be rewritten automatically under -rewrite -source 3.6-migration. diff --git a/tests/warn/21681b.check b/tests/warn/21681b.check index 09c007f351b4..dd28df3168ed 100644 --- a/tests/warn/21681b.check +++ b/tests/warn/21681b.check @@ -5,4 +5,3 @@ | not as an assignment. | | To assign a value, use curly braces: `{age = 29}`. - | This can be rewritten automatically under -rewrite -source 3.6-migration. diff --git a/tests/warn/21681c.check b/tests/warn/21681c.check index 20273f723384..bfb62618cbb9 100644 --- a/tests/warn/21681c.check +++ b/tests/warn/21681c.check @@ -5,4 +5,3 @@ | not as an assignment. | | To assign a value, use curly braces: `{age = 29}`. - | This can be rewritten automatically under -rewrite -source 3.6-migration. diff --git a/tests/warn/21770.check b/tests/warn/21770.check index 7853d77a423c..6c978a6078a2 100644 --- a/tests/warn/21770.check +++ b/tests/warn/21770.check @@ -5,4 +5,3 @@ | not as an assignment. | | To assign a value, use curly braces: `{cache = Some(i)}`. - | This can be rewritten automatically under -rewrite -source 3.6-migration.