mirror of https://github.com/sbt/sbt.git
fix cache test
This commit is contained in:
parent
f788437164
commit
bbf9bc679e
|
|
@ -188,6 +188,22 @@ trait HListCacheImplicits
|
|||
}
|
||||
|
||||
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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ object CacheTest// extends Properties("Cache test")
|
|||
|
||||
import Cache._
|
||||
import FileInfo.hash._
|
||||
import Ordering._
|
||||
import sbinary.DefaultProtocol.FileFormat
|
||||
def test
|
||||
{
|
||||
lazy val create = new File("test")
|
||||
|
|
|
|||
Loading…
Reference in New Issue