diff options
author | Li Haoyi <haoyi.sg@gmail.com> | 2018-01-13 13:00:21 -0800 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2018-01-13 14:37:24 -0800 |
commit | 57501fca3b6c2c64d32744e6d534b9de3a6674f6 (patch) | |
tree | 912a22fb405c971f4a4b75d737a35e522d6a420e /scalalib/src/test | |
parent | 91102940a0bcdd7efc1d13e43510c4a0e406ead2 (diff) | |
download | mill-57501fca3b6c2c64d32744e6d534b9de3a6674f6.tar.gz mill-57501fca3b6c2c64d32744e6d534b9de3a6674f6.tar.bz2 mill-57501fca3b6c2c64d32744e6d534b9de3a6674f6.zip |
Migrate most classpath-related code onto `Loose.OSet` abstraction, to enforce deduplication
Diffstat (limited to 'scalalib/src/test')
-rw-r--r-- | scalalib/src/test/scala/mill/scalalib/ResolveDepsTests.scala | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/scalalib/src/test/scala/mill/scalalib/ResolveDepsTests.scala b/scalalib/src/test/scala/mill/scalalib/ResolveDepsTests.scala index c5a05d02..c4404fe6 100644 --- a/scalalib/src/test/scala/mill/scalalib/ResolveDepsTests.scala +++ b/scalalib/src/test/scala/mill/scalalib/ResolveDepsTests.scala @@ -4,34 +4,35 @@ import coursier.Cache import coursier.maven.MavenRepository import mill.eval.Result.{Failure, Success} import mill.eval.{PathRef, Result} +import mill.util.Loose.OSet import utest._ object ResolveDepsTests extends TestSuite { val repos = Seq(Cache.ivy2Local, MavenRepository("https://repo1.maven.org/maven2")) - def evalDeps(deps: Seq[Dep]): Result[Seq[PathRef]] = Lib.resolveDependencies(repos, "2.12.4", "2.12", deps) + def evalDeps(deps: OSet[Dep]): Result[OSet[PathRef]] = Lib.resolveDependencies(repos, "2.12.4", "2.12", deps) val tests = Tests { 'resolveValidDeps - { - val deps = Seq(Dep("com.lihaoyi", "pprint", "0.5.3")) + val deps = OSet(Dep("com.lihaoyi", "pprint", "0.5.3")) val Success(paths) = evalDeps(deps) assert(paths.nonEmpty) } 'errOnInvalidOrgDeps - { - val deps = Seq(Dep("xxx.yyy.invalid", "pprint", "0.5.3")) + val deps = OSet(Dep("xxx.yyy.invalid", "pprint", "0.5.3")) val Failure(errMsg) = evalDeps(deps) assert(errMsg.contains("xxx.yyy.invalid")) } 'errOnInvalidVersionDeps - { - val deps = Seq(Dep("com.lihaoyi", "pprint", "invalid.version.num")) + val deps = OSet(Dep("com.lihaoyi", "pprint", "invalid.version.num")) val Failure(errMsg) = evalDeps(deps) assert(errMsg.contains("invalid.version.num")) } 'errOnPartialSuccess - { - val deps = Seq(Dep("com.lihaoyi", "pprint", "0.5.3"), Dep("fake", "fake", "fake")) + val deps = OSet(Dep("com.lihaoyi", "pprint", "0.5.3"), Dep("fake", "fake", "fake")) val Failure(errMsg) = evalDeps(deps) assert(errMsg.contains("fake")) } |