mirror of
https://github.com/sbt/sbt.git
synced 2026-08-22 06:07:24 +02:00
fix cache test
This commit is contained in:
Vendored
+16
@@ -188,6 +188,22 @@ trait HListCacheImplicits
|
|||||||
}
|
}
|
||||||
|
|
||||||
implicit def hNilCache: InputCache[HNil] = Cache.singleton(HNil : HNil)
|
implicit def hNilCache: InputCache[HNil] = Cache.singleton(HNil : HNil)
|
||||||
|
|
||||||
|
implicit def hConsFormat[H, T <: HList](implicit head: Format[H], tail: Format[T]): Format[H :+: T] = new Format[H :+: T] {
|
||||||
|
def reads(from: Input) =
|
||||||
|
{
|
||||||
|
val h = head.reads(from)
|
||||||
|
val t = tail.reads(from)
|
||||||
|
HCons(h, t)
|
||||||
|
}
|
||||||
|
def writes(to: Output, hc: H :+: T)
|
||||||
|
{
|
||||||
|
head.writes(to, hc.head)
|
||||||
|
tail.writes(to, hc.tail)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
implicit def hNilFormat: Format[HNil] = asSingleton(HNil)
|
||||||
}
|
}
|
||||||
trait UnionImplicits
|
trait UnionImplicits
|
||||||
{
|
{
|
||||||
|
|||||||
Vendored
+2
@@ -10,6 +10,8 @@ object CacheTest// extends Properties("Cache test")
|
|||||||
|
|
||||||
import Cache._
|
import Cache._
|
||||||
import FileInfo.hash._
|
import FileInfo.hash._
|
||||||
|
import Ordering._
|
||||||
|
import sbinary.DefaultProtocol.FileFormat
|
||||||
def test
|
def test
|
||||||
{
|
{
|
||||||
lazy val create = new File("test")
|
lazy val create = new File("test")
|
||||||
|
|||||||
Reference in New Issue
Block a user