|
Scala example source code file (Unrolled.scala)
The Scala Unrolled.scala source codeimport org.scalacheck._ import Prop._ import Gen._ import collection.mutable.UnrolledBuffer object Test extends Properties("UnrolledBuffer") { property("concat size") = forAll { (l1: List[Int], l2: List[Int]) => val u1 = new UnrolledBuffer[Int] u1 ++= l1 val u2 = new UnrolledBuffer[Int] u2 ++= l2 val totalsz = u1.size + u2.size u1 concat u2 totalsz == u1.size } property("adding") = forAll { (l: List[Int]) => val u = new UnrolledBuffer[Int] u ++= l u == l } } Other Scala examples (source code examples)Here is a short list of links related to this Scala Unrolled.scala source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.