diff --git a/.drone.yml b/.drone.yml index 4ecb76d..658faf5 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,10 +6,12 @@ steps: commands: - apk add --no-cache yarn - yarn add jsdom object-sizeof + # Patch Bloop version to support Scala.js 1.0 + - apk add --no-cache curl && curl -L https://github.com/scalacenter/bloop/releases/download/v1.4.0-RC1/install.py | python - -d /usr/bin/ -v 1.4.0-RC1-229-b7c15aa9 || true - blp-server & - seed --build=build211.toml bloop - bloop compile pine-native - - bloop test pine-jvm pine-js + - bloop test pine-jvm - sleep 5 # Synchronise analysis.bin files, otherwise rm might fail - rm -rf .bloop build - seed --build=build212.toml bloop diff --git a/.travis.yml b/.travis.yml index 0ff6c8b..1f911ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,7 @@ install: # See https://github.com/scala-js/scala-js/issues/2642 script: - sbt 'set parallelExecution in ThisBuild := false' pineJS2_11/test pineJVM2_11/test pineNative2_11/test pineJS2_12/test pineJVM2_12/test pineJS2_13/test pineJVM2_13/test + sbt 'set parallelExecution in ThisBuild := false' pineJVM2_11/test pineNative2_11/test pineJS2_12/test pineJVM2_12/test pineJS2_13/test pineJVM2_13/test # From http://www.scala-sbt.org/0.13/docs/Travis-CI-with-sbt.html # Use container-based infrastructure diff --git a/README.md b/README.md index 066e113..fbf99be 100644 --- a/README.md +++ b/README.md @@ -23,13 +23,14 @@ Pine is a functional HTML5 and XML library for the Scala platform. It supports p * DSL for attaching/detaching events ## Compatibility -| Back end | Scala versions | -|:---------------|:-----------------| -| JVM | 2.11, 2.12, 2.13 | -| JavaScript (1) | 2.11, 2.12, 2.13 | -| Native | 2.11 | +| Platform | Platform version | Scala versions | +|:-------------|:-----------------|:-----------------------------| +| JVM | | 2.11 (T), 2.12 (T), 2.13 (L) | +| Scala.js | 1.0 | 2.12 (T), 2.13 (L) | +| Scala Native | 0.4.0-M2 | 2.11 (T) | -* (1) Adds support for browser DOM +* (T): Typelevel Scala +* (L): Lightbend Scala ## Examples ```scala @@ -52,7 +53,7 @@ Pine makes use of a language extension called *literal types*, see [SIP-23](http ### 2.13 onwards ```scala -scalaVersion := "2.13.0" +scalaVersion := "2." libraryDependencies += scalaOrganization.value % "scala-reflect" % scalaVersion.value ``` @@ -79,8 +80,8 @@ addCompilerPlugin("org.scala-native" % "nscplugin" % nativeVersion cross CrossVe ### Dependencies ```scala -libraryDependencies += "tech.sparse" %% "pine" % "0.1.3" // JVM -libraryDependencies += "tech.sparse" %%% "pine" % "0.1.3" // JavaScript, Native +libraryDependencies += "tech.sparse" %% "pine" % "" // JVM +libraryDependencies += "tech.sparse" %%% "pine" % "" // JavaScript, Native ``` ## Links diff --git a/build.sbt b/build.sbt index d0b1008..38a641c 100644 --- a/build.sbt +++ b/build.sbt @@ -5,12 +5,10 @@ val V = new { val paradise = "2.1.1" val scala2_11 = "2.11.11-bin-typelevel-4" val scala2_12 = "2.12.4-bin-typelevel-4" - val scala2_13 = "2.13.1" - val scalaTest = "3.0.8" - val scalaTestNative = "3.2.0-SNAP10" - val scalaCheck = "1.14.0" - val scalaCheckNative = "1.14.1" - val scalaJsDom = "0.9.7" + val scala2_13 = "2.13.3" + val scalaTest = "3.2.2" + val scalaCheck = "1.14.3" + val scalaJsDom = "1.1.0" } ThisBuild / scalaVersion := V.scala2_13 @@ -25,6 +23,9 @@ val commonSettings = nocomma { libraryDependencies ++= Seq( scalaOrganization.value % "scala-reflect" % scalaVersion.value % "provided", scalaOrganization.value % "scala-compiler" % scalaVersion.value % "provided", + + "org.scalatest" %%% "scalatest" % V.scalaTest % "test", + "org.scalacheck" %%% "scalacheck" % V.scalaCheck % "test" ) scalacOptions ++= Seq( @@ -44,7 +45,6 @@ val commonSettings = nocomma { "-Xlint:inaccessible", // Warn about inaccessible types in method signatures. "-Xlint:infer-any", // Warn when a type argument is inferred to be `Any`. "-Xlint:missing-interpolator", // A string literal appears to be missing an interpolator id. - "-Xlint:nullary-override", // Warn when non-nullary `def f()' overrides nullary `def f'. "-Xlint:nullary-unit", // Warn when nullary methods return Unit. "-Xlint:option-implicit", // Option.apply used implicit view. "-Xlint:package-object-classes", // Class or object defined in package object. @@ -59,7 +59,7 @@ val commonSettings = nocomma { val Pre13Settings = nocomma { scalaOrganization := "org.typelevel" - + scalacOptions ++= Seq( "-Xfuture", // Turn on future language features. "-Xlint:by-name-right-associative", // By-name parameter of right associative operator. @@ -72,7 +72,7 @@ val Pre13Settings = nocomma { "-Ywarn-nullary-override", // Warn when non-nullary `def f()' overrides nullary `def f'. "-Ywarn-nullary-unit", // Warn when nullary methods return Unit. ) - + addCompilerPlugin("org.scalamacros" %% "paradise" % V.paradise cross CrossVersion.patch) } @@ -98,18 +98,11 @@ val Scala13Settings = Post11Settings ++ nocomma { scalacOptions += "-Ymacro-annotations" } -val JvmSettings = nocomma { - libraryDependencies ++= Seq( - "org.scalatest" %% "scalatest" % V.scalaTest % "test", - "org.scalacheck" %% "scalacheck" % V.scalaCheck % "test", - ) -} +val JvmSettings = Seq() val JsSettings = nocomma { libraryDependencies ++= Seq( - "org.scalatest" %%% "scalatest" % V.scalaTest % "test", - "org.scalacheck" %%% "scalacheck" % V.scalaCheck % "test", - "org.scala-js" %%% "scalajs-dom" % V.scalaJsDom, + "org.scala-js" %%% "scalajs-dom" % V.scalaJsDom ) // We need to remove and re-add this if working under the typelevel compiler @@ -123,11 +116,6 @@ val JsSettings = nocomma { } val NativeSettings = nocomma { - libraryDependencies ++= Seq( - "org.scalatest" %%% "scalatest" % V.scalaTestNative % "test", - "com.github.lolgab" %%% "scalacheck" % V.scalaCheckNative % "test" - ) - libraryDependencies ~= (_.filterNot(_.name == "nscplugin")) addCompilerPlugin("org.scala-native" % "nscplugin" % nativeVersion cross CrossVersion.patch) @@ -145,7 +133,6 @@ lazy val pine = (projectMatrix in file(".")) .jvmPlatform( Seq(V.scala2_11), JvmSettings ++ Scala11Settings) .jsPlatform( Seq(V.scala2_13), JsSettings ++ Scala13Settings) .jsPlatform( Seq(V.scala2_12), JsSettings ++ Scala12Settings) - .jsPlatform( Seq(V.scala2_11), JsSettings ++ Scala11Settings) .nativePlatform( Seq(V.scala2_11), NativeSettings ++ Pre13Settings) // root settings. src/ is handled by sbt-projectmatrix diff --git a/build211.toml b/build211.toml index 4e0c2e3..e15495e 100644 --- a/build211.toml +++ b/build211.toml @@ -1,7 +1,6 @@ [project] scalaVersion = "2.11.11-bin-typelevel-4" -scalaJsVersion = "0.6.28" -scalaNativeVersion = "0.3.7" +scalaNativeVersion = "0.4.0-M2" scalaOptions = [ "-deprecation", # Emit warning and location for usages of deprecated APIs. "-encoding", "utf-8", # Specify character encoding used by source files. @@ -31,7 +30,7 @@ scalaOptions = [ "-Ywarn-numeric-widen", # Warn when numerics are widened. ### pre-13 options ### - + "-Xfuture", # Turn on future language features. "-Xlint:by-name-right-associative", # By-name parameter of right associative operator. "-Xlint:unsound-match", # Pattern match may not be typesafe. @@ -52,36 +51,24 @@ testFrameworks = [ [module.pine] root = "src/main/scala" sources = ["src/main/scala"] -targets = ["js", "jvm", "native"] +targets = ["jvm", "native"] [module.pine.test] sources = ["src/test/scala"] -targets = ["js", "jvm"] +targets = ["jvm"] scalaDeps = [ - ["org.scalatest" , "scalatest" , "3.0.8" ], - ["org.scalacheck", "scalacheck", "1.14.0"] + ["org.scalatest" , "scalatest" , "3.2.2" ], + ["org.scalacheck", "scalacheck", "1.14.3"] ] [module.pine.jvm] root = "src/main/scala-jvm" sources = ["src/main/scala-jvm"] -[module.pine.js] -root = "src/main/scala-js" -sources = ["src/main/scala-js"] -scalaDeps = [ - ["org.scala-js", "scalajs-dom", "0.9.7"] -] - -[module.pine.test.js] -jsdom = true -sources = ["src/test/scala-js"] - [module.pine-bench] moduleDeps = ["pine"] root = "src/bench" sources = ["src/bench/shared"] -targets = ["js", "jvm"] [module.pine-bench.jvm] root = "src/bench/jvm" @@ -89,8 +76,3 @@ sources = ["src/bench/jvm"] javaDeps = [ ["org.openjdk.jol", "jol-core", "0.13"] ] - -[module.pine-bench.js] -root = "src/bench/js" -sources = ["src/bench/js"] -moduleKind = "commonjs" diff --git a/build212.toml b/build212.toml index a921172..bf7b42e 100644 --- a/build212.toml +++ b/build212.toml @@ -1,6 +1,6 @@ [project] scalaVersion = "2.12.4-bin-typelevel-4" -scalaJsVersion = "0.6.28" +scalaJsVersion = "1.0.1" scalaOptions = [ "-deprecation", # Emit warning and location for usages of deprecated APIs. "-encoding", "utf-8", # Specify character encoding used by source files. @@ -42,7 +42,7 @@ scalaOptions = [ # "-Ywarn-value-discard" # Warn when non-Unit expression results are unused. ### pre-13 options ### - + "-Xfuture", # Turn on future language features. "-Xlint:by-name-right-associative", # By-name parameter of right associative operator. "-Xlint:unsound-match", # Pattern match may not be typesafe. @@ -69,8 +69,8 @@ targets = ["js", "jvm"] sources = ["src/test/scala"] targets = ["js", "jvm"] scalaDeps = [ - ["org.scalatest" , "scalatest" , "3.0.8" ], - ["org.scalacheck", "scalacheck", "1.14.0"] + ["org.scalatest" , "scalatest" , "3.1.1" ], + ["org.scalacheck", "scalacheck", "1.14.3"] ] [module.pine.jvm] @@ -81,7 +81,7 @@ sources = ["src/main/scala-jvm"] root = "src/main/scala-js" sources = ["src/main/scala-js"] scalaDeps = [ - ["org.scala-js", "scalajs-dom", "0.9.7"] + ["org.scala-js", "scalajs-dom", "1.1.0"] ] [module.pine.test.js] diff --git a/build213.toml b/build213.toml index 277623e..9310f85 100644 --- a/build213.toml +++ b/build213.toml @@ -1,6 +1,6 @@ [project] -scalaVersion = "2.13.0" -scalaJsVersion = "0.6.28" +scalaVersion = "2.13.2" +scalaJsVersion = "1.0.1" scalaOptions = [ "-deprecation", # Emit warning and location for usages of deprecated APIs. "-encoding", "utf-8", # Specify character encoding used by source files. @@ -18,7 +18,6 @@ scalaOptions = [ "-Xlint:inaccessible", # Warn about inaccessible types in method signatures. "-Xlint:infer-any", # Warn when a type argument is inferred to be `Any`. "-Xlint:missing-interpolator", # A string literal appears to be missing an interpolator id. - "-Xlint:nullary-override", # Warn when non-nullary `def f()' overrides nullary `def f'. "-Xlint:nullary-unit", # Warn when nullary methods return Unit. "-Xlint:option-implicit", # Option.apply used implicit view. "-Xlint:package-object-classes", # Class or object defined in package object. @@ -55,8 +54,8 @@ targets = ["js", "jvm"] sources = ["src/test/scala"] targets = ["js", "jvm"] scalaDeps = [ - ["org.scalatest" , "scalatest" , "3.0.8" ], - ["org.scalacheck", "scalacheck", "1.14.0"] + ["org.scalatest" , "scalatest" , "3.1.1" ], + ["org.scalacheck", "scalacheck", "1.14.3"] ] [module.pine.jvm] @@ -67,7 +66,7 @@ sources = ["src/main/scala-jvm"] root = "src/main/scala-js" sources = ["src/main/scala-js"] scalaDeps = [ - ["org.scala-js", "scalajs-dom", "0.9.7"] + ["org.scala-js", "scalajs-dom", "1.1.0"] ] [module.pine.test.js] diff --git a/project/plugins.sbt b/project/plugins.sbt index d878a0c..8ec379f 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,6 +4,7 @@ logLevel := Level.Warn // see http://eed3si9n.com/removing-commas-with-sbt-nocomma addSbtPlugin("com.eed3si9n" % "sbt-nocomma" % "0.1.0") addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.3.0") -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.28") -addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.3.7") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.2.0") +addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.0-M2") +libraryDependencies += "org.scala-js" %% "scalajs-env-jsdom-nodejs" % "1.1.0" diff --git a/src/bench/js/pine/bench/PlatformBench.scala b/src/bench/js/pine/bench/PlatformBench.scala index 5351712..b83468c 100644 --- a/src/bench/js/pine/bench/PlatformBench.scala +++ b/src/bench/js/pine/bench/PlatformBench.scala @@ -7,7 +7,7 @@ import pine.dom._ import pine.bench.BenchUtil._ class PlatformBench extends BenchmarkSuite with TreeBench { - val isNodeJs = js.isUndefined(org.scalajs.dom.window) + val isNodeJs = js.typeOf(js.Dynamic.global.window) == "undefined" if (isNodeJs) println("[warn] Ignoring all tests requiring DOM access") else { @@ -17,7 +17,7 @@ class PlatformBench extends BenchmarkSuite with TreeBench { org.scalajs.dom.document.body.appendChild(rendered) DOM.render { implicit ctx => ref := "test" } org.scalajs.dom.document.body.removeChild(rendered) - numberOfNodes(depth) -> () + numberOfNodes(depth) -> (()) } bench("Render as DOM node", depths, measureMemory = false) { depth => diff --git a/src/bench/js/pine/bench/PlatformUtil.scala b/src/bench/js/pine/bench/PlatformUtil.scala index 09583c2..f2b1bc4 100644 --- a/src/bench/js/pine/bench/PlatformUtil.scala +++ b/src/bench/js/pine/bench/PlatformUtil.scala @@ -12,7 +12,7 @@ object SizeOf extends js.Object { object PlatformUtil { def cliArgs(): List[String] = - if (js.isUndefined(js.Dynamic.global.process)) List() + if (js.typeOf(js.Dynamic.global.process) == "undefined") List() else js.Dynamic.global.process.argv.asInstanceOf[js.Array[String]].toList.drop(2) def format(value: Double): String = value.toFixed(1) def measure(obj: Any): Long = diff --git a/src/main/scala-js/pine/dom/Js.scala b/src/main/scala-js/pine/dom/Js.scala index b4609bf..6d163ae 100644 --- a/src/main/scala-js/pine/dom/Js.scala +++ b/src/main/scala-js/pine/dom/Js.scala @@ -15,32 +15,20 @@ trait JsLowPrio { object Js extends JsLowPrio { implicit object JsA extends JsHtml[tag.A] { override type X = dom.html.Anchor } implicit object JsB extends JsHtml[tag.B] { override type X = dom.html.Span } - @deprecated("Element is deprecated", since = "html5") - implicit object JsApplet extends JsHtml[tag.Applet] { override type X = dom.html.Applet } implicit object JsArea extends JsHtml[tag.Area] { override type X = dom.html.Area } implicit object JsAudio extends JsHtml[tag.Audio] { override type X = dom.html.Audio } implicit object JsBR extends JsHtml[tag.Br] { override type X = dom.html.BR } implicit object JsBase extends JsHtml[tag.Base] { override type X = dom.html.Base } - @deprecated("Element is deprecated", since = "html5") - implicit object JsBaseFont extends JsHtml[tag.Basefont] { override type X = dom.html.BaseFont } implicit object JsBody extends JsHtml[tag.Body] { override type X = dom.html.Body } implicit object JsButton extends JsHtml[tag.Button] { override type X = dom.html.Button } implicit object JsCanvas extends JsHtml[tag.Canvas] { override type X = dom.html.Canvas } // implicit object JsCollection extends JsHtml[tag.Col] { override type X = dom.html.Collection } - implicit object JsDD extends JsHtml[tag.Dd] { override type X = dom.html.DD } implicit object JsDList extends JsHtml[tag.Dl] { override type X = dom.html.DList } - implicit object JsDT extends JsHtml[tag.Dt] { override type X = dom.html.DT } implicit object JsDataList extends JsHtml[tag.Datalist] { override type X = dom.html.DataList } - @deprecated("Element is deprecated", since = "html5") - implicit object JsDirectory extends JsHtml[tag.Dir] { override type X = dom.html.Directory } implicit object JsDiv extends JsHtml[tag.Div] { override type X = dom.html.Div } implicit object JsEmbed extends JsHtml[tag.Embed] { override type X = dom.html.Embed } implicit object JsFieldSet extends JsHtml[tag.Fieldset] { override type X = dom.html.FieldSet } implicit object JsForm extends JsHtml[tag.Form] { override type X = dom.html.Form } - @deprecated("Element is deprecated", since = "html5") - implicit object JsFrame extends JsHtml[tag.Frame] { override type X = dom.html.Frame } - @deprecated("Element is deprecated", since = "html5") - implicit object JsFrameSet extends JsHtml[tag.Frameset] { override type X = dom.html.FrameSet } implicit object JsH1 extends JsHtml[tag.H1] { override type X = dom.html.Heading } implicit object JsH2 extends JsHtml[tag.H2] { override type X = dom.html.Heading } implicit object JsH3 extends JsHtml[tag.H3] { override type X = dom.html.Heading } @@ -54,8 +42,6 @@ object Js extends JsLowPrio { implicit object JsIFrame extends JsHtml[tag.Iframe] { override type X = dom.html.IFrame } implicit object JsImage extends JsHtml[tag.Img] { override type X = dom.html.Image } implicit object JsInput extends JsHtml[tag.Input] { override type X = dom.html.Input } - @deprecated("Element is deprecated", since = "html5") - implicit object JsIsIndex extends JsHtml[tag.Isindex] { override type X = dom.html.IsIndex } implicit object JsLabel extends JsHtml[tag.Label] { override type X = dom.html.Label } implicit object JsLegend extends JsHtml[tag.Legend] { override type X = dom.html.Legend } implicit object JsLi extends JsHtml[tag.Li] { override type X = dom.html.LI } @@ -80,8 +66,8 @@ object Js extends JsLowPrio { implicit object JsStyle extends JsHtml[tag.Style] { override type X = dom.html.Style } implicit object JsTable extends JsHtml[tag.Table] { override type X = dom.html.Table } implicit object JsTableRow extends JsHtml[tag.Tr] { override type X = dom.html.TableRow } - implicit object JsTableDataCell extends JsHtml[tag.Td] { override type X = dom.html.TableDataCell } - implicit object JsTableHeadCell extends JsHtml[tag.Th] { override type X = dom.html.TableHeaderCell } + implicit object JsTableDataCell extends JsHtml[tag.Td] { override type X = dom.html.TableCell } + implicit object JsTableHeadCell extends JsHtml[tag.Th] { override type X = dom.html.TableCell } implicit object JsTextArea extends JsHtml[tag.Textarea] { override type X = dom.html.TextArea } implicit object JsTitle extends JsHtml[tag.Title] { override type X = dom.html.Title } implicit object JsTrack extends JsHtml[tag.Track] { override type X = dom.html.Track } diff --git a/src/test/scala-js/pine/dom/DOMSpec.scala b/src/test/scala-js/pine/dom/DOMSpec.scala index f9e88cb..72fae02 100644 --- a/src/test/scala-js/pine/dom/DOMSpec.scala +++ b/src/test/scala-js/pine/dom/DOMSpec.scala @@ -1,13 +1,13 @@ package pine.dom import org.scalajs.dom -import org.scalatest.FunSuite +import org.scalatest.funsuite.AnyFunSuite import pine._ import scala.collection.mutable.ListBuffer import scala.scalajs.js -class DOMSpec extends FunSuite { +class DOMSpec extends AnyFunSuite { /* test("Render node with one-way binding") { val title = Var("test") diff --git a/src/test/scala-js/pine/dom/TagRefSpec.scala b/src/test/scala-js/pine/dom/TagRefSpec.scala index fa1f351..633828b 100644 --- a/src/test/scala-js/pine/dom/TagRefSpec.scala +++ b/src/test/scala-js/pine/dom/TagRefSpec.scala @@ -1,11 +1,11 @@ package pine.dom import org.scalajs.dom.document -import org.scalatest.FunSuite +import org.scalatest.funsuite.AnyFunSuite import pine._ -class TagRefSpec extends FunSuite { +class TagRefSpec extends AnyFunSuite { test("Get value of String attribute") { val node = document.createElement("a") node.setAttribute("id", "test") diff --git a/src/test/scala/pine/DiffSpec.scala b/src/test/scala/pine/DiffSpec.scala index 0b575e2..9629ca7 100644 --- a/src/test/scala/pine/DiffSpec.scala +++ b/src/test/scala/pine/DiffSpec.scala @@ -1,8 +1,8 @@ package pine -import org.scalatest.FunSuite +import org.scalatest.funsuite.AnyFunSuite -class DiffSpec extends FunSuite { +class DiffSpec extends AnyFunSuite { test("Replace nodes") { val spanAge = TagRef["span"]("age") val spanName = TagRef["span"]("name") diff --git a/src/test/scala/pine/ExternalHtmlSpec.scala b/src/test/scala/pine/ExternalHtmlSpec.scala index fea4ad3..5feedaf 100644 --- a/src/test/scala/pine/ExternalHtmlSpec.scala +++ b/src/test/scala/pine/ExternalHtmlSpec.scala @@ -1,8 +1,8 @@ package pine -import org.scalatest.FunSuite +import org.scalatest.funsuite.AnyFunSuite -class ExternalHtmlSpec extends FunSuite { +class ExternalHtmlSpec extends AnyFunSuite { def checkTestHtml(value: String): Unit = assert(value == """ diff --git a/src/test/scala/pine/HtmlHelpersSpec.scala b/src/test/scala/pine/HtmlHelpersSpec.scala index 4e2e60e..9e0d2d3 100644 --- a/src/test/scala/pine/HtmlHelpersSpec.scala +++ b/src/test/scala/pine/HtmlHelpersSpec.scala @@ -1,8 +1,8 @@ package pine -import org.scalatest.FunSuite +import org.scalatest.funsuite.AnyFunSuite -class HtmlHelpersSpec extends FunSuite { +class HtmlHelpersSpec extends AnyFunSuite { test("Reader") { val reader = new Reader("test;bc") assert(reader.collect(';').contains("test")) diff --git a/src/test/scala/pine/HtmlParserSpec.scala b/src/test/scala/pine/HtmlParserSpec.scala index c976883..081b95a 100644 --- a/src/test/scala/pine/HtmlParserSpec.scala +++ b/src/test/scala/pine/HtmlParserSpec.scala @@ -1,8 +1,8 @@ package pine -import org.scalatest.FunSuite +import org.scalatest.funsuite.AnyFunSuite -class HtmlParserSpec extends FunSuite { +class HtmlParserSpec extends AnyFunSuite { test("Empty text node") { assertThrows[ParseError] { HtmlParser.fromString("") diff --git a/src/test/scala/pine/InlineHtmlSpec.scala b/src/test/scala/pine/InlineHtmlSpec.scala index 04a4392..585eb32 100644 --- a/src/test/scala/pine/InlineHtmlSpec.scala +++ b/src/test/scala/pine/InlineHtmlSpec.scala @@ -1,8 +1,8 @@ package pine -import org.scalatest.FunSuite +import org.scalatest.funsuite.AnyFunSuite -class InlineHtmlSpec extends FunSuite { +class InlineHtmlSpec extends AnyFunSuite { test("toHtml on immutable tree") { val url = "http://github.com/" val title = "GitHub" diff --git a/src/test/scala/pine/NodeSpec.scala b/src/test/scala/pine/NodeSpec.scala index 788ca34..43fb4a9 100644 --- a/src/test/scala/pine/NodeSpec.scala +++ b/src/test/scala/pine/NodeSpec.scala @@ -1,8 +1,8 @@ package pine -import org.scalatest.FunSuite +import org.scalatest.funsuite.AnyFunSuite -class NodeSpec extends FunSuite { +class NodeSpec extends AnyFunSuite { test("Instantiate node") { val a = tag.A .href("http://github.com/") diff --git a/src/test/scala/pine/TagRefSpec.scala b/src/test/scala/pine/TagRefSpec.scala index 6a24982..4a937a8 100644 --- a/src/test/scala/pine/TagRefSpec.scala +++ b/src/test/scala/pine/TagRefSpec.scala @@ -1,8 +1,8 @@ package pine -import org.scalatest.FunSuite +import org.scalatest.funsuite.AnyFunSuite -class TagRefSpec extends FunSuite { +class TagRefSpec extends AnyFunSuite { test("Use DSL to set boolean attribute to true") { val node = tag.Input.id("test") diff --git a/src/test/scala/pine/TextSpec.scala b/src/test/scala/pine/TextSpec.scala index 68e30f1..385efba 100644 --- a/src/test/scala/pine/TextSpec.scala +++ b/src/test/scala/pine/TextSpec.scala @@ -1,8 +1,8 @@ package pine -import org.scalatest.FunSuite +import org.scalatest.funsuite.AnyFunSuite -class TextSpec extends FunSuite { +class TextSpec extends AnyFunSuite { test("Text node") { val node = tag.Span.set(Text("Hello\nworld")) assert(node.toText == "Hello world") diff --git a/src/test/scala/pine/XmlParserSpec.scala b/src/test/scala/pine/XmlParserSpec.scala index 4741dd9..9ded7ba 100644 --- a/src/test/scala/pine/XmlParserSpec.scala +++ b/src/test/scala/pine/XmlParserSpec.scala @@ -1,8 +1,8 @@ package pine -import org.scalatest.FunSuite +import org.scalatest.funsuite.AnyFunSuite -class XmlParserSpec extends FunSuite { +class XmlParserSpec extends AnyFunSuite { test("Simple node") { val xml = "test" assert(XmlParser.fromString(xml) == tag.B.set("test"))