summaryrefslogtreecommitdiff
path: root/integration/test/src/UpickleTests.scala
blob: 46c972234ef7deb69ffc7331b07f813cf30099f2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package mill.integration

import utest._

class UpickleTests(fork: Boolean) extends IntegrationTestSuite("MILL_UPICKLE_REPO", "upickle", fork) {
  val tests = Tests{
    initWorkspace()
    test("jvm21111"){
      mill.util.TestUtil.disableInJava9OrAbove({
        assert(eval("upickleJvm[2.11.11].test"))
        val jvmMeta = meta("upickleJvm[2.11.11].test.test")
        assert(jvmMeta.contains("example.ExampleTests.simple"))
        assert(jvmMeta.contains("upickle.MacroTests.commonCustomStructures.simpleAdt"))
      })
    }
    test("jvm2124"){
      assert(eval("upickleJvm[2.12.4].test"))
      val jvmMeta = meta("upickleJvm[2.12.4].test.test")
      assert(jvmMeta.contains("example.ExampleTests.simple"))
      assert(jvmMeta.contains("upickle.MacroTests.commonCustomStructures.simpleAdt"))
    }
    test("js"){
      assert(eval("upickleJs[2.12.4].test"))
      val jsMeta = meta("upickleJs[2.12.4].test.test")
      assert(jsMeta .contains("example.ExampleTests.simple"))
      assert(jsMeta .contains("upickle.MacroTests.commonCustomStructures.simpleAdt"))
    }

  }
}