summaryrefslogtreecommitdiff
path: root/integration/test/src/CaffeineTests.scala
blob: 56c66b214d3c2786f3302b0452c6716bac619859 (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
31
32
33
34
package mill.integration

import utest._

class CaffeineTests(fork: Boolean) extends IntegrationTestSuite("MILL_CAFFEINE_REPO", "caffeine", fork) {
  val tests = Tests{
    initWorkspace()
    'test - {
      // Caffeine only can build using Java 9 or up. Java 8 results in weird
      // type inference issues during the compile
      if (mill.main.client.Util.isJava9OrAbove){
        assert(eval("caffeine.test.compile"))

        val suites = Seq(
          "com.github.benmanes.caffeine.SingleConsumerQueueTest",
          "com.github.benmanes.caffeine.cache.AsyncTest",
          "com.github.benmanes.caffeine.cache.CaffeineTest",
          "com.github.benmanes.caffeine.cache.TimerWheelTest"
        )
        assert(eval(
          "caffeine.test",
          "-testclass", suites.mkString(",")
        ))
        assert(eval("guava.test.compile"))
        assert(eval("guava.test"))

        assert(eval("jcache.test.compile"))
        assert(eval("simulator.test.compile"))

      }
    }

  }
}