Permalink
Browse files

iterableviewlike examples

  • Loading branch information...
1 parent e8f8402 commit bcf219e26c67fd04f6f6ebf7ee65b95e6f6dfd66 @balshor committed Aug 3, 2011
@@ -5,7 +5,7 @@ import scala.collection.mutable.Builder
import org.specs._
import com.bizo.scala.collection._
-object HashSetSpec extends TraversableSpec with SetLikeSpec {
+object HashSetSpec extends TraversableSpec with SetLikeSpec with IterableViewSpec {
"immutable HashSets" should {
import scala.collection.immutable.HashSet
@@ -17,14 +17,18 @@ object HashSetSpec extends TraversableSpec with SetLikeSpec {
"satisfy setlike examples" in { setLikeExamples[HashSet] }
}
"using views" in {
- implicit val _ = new GenericCompanionView[HashSet](HashSet)
+ implicit val _1 = new GenericCompanionView[HashSet](HashSet)
+ implicit val _2 = new CompanionIterableView[HashSet](HashSet)
"satisfy gentraversablelike examples" in { genTraversableLikeExamples }
"satisfy traversable examples" in { traversableExamples }
+ "satisfy iterableviewlike examples" in { iterableViewLikeExamples }
}
"using range views" in {
- implicit val _ = new GenericCompanionRangeView[HashSet](HashSet)
+ implicit val _1 = new GenericCompanionRangeView[HashSet](HashSet)
+ implicit val _2 = new CompanionIterableRangeView[HashSet](HashSet)
"satisfy gentraversablelike examples" in { genTraversableLikeExamples }
"satisfy traversable examples" in { traversableExamples }
+ "satisfy iterableviewlike examples" in { iterableViewLikeExamples }
}
}
@@ -3,7 +3,7 @@ package com.bizo.scala.collection.immutable
import org.specs._
import com.bizo.scala.collection._
-object ListSpec extends TraversableSpec {
+object ListSpec extends TraversableSpec with IterableViewSpec {
override val isOrdered = true
@@ -15,14 +15,18 @@ object ListSpec extends TraversableSpec {
"satisfy traversable examples" in { traversableExamples }
}
"using views" in {
- implicit val _ = new GenericCompanionView[List](List)
+ implicit val _1 = new GenericCompanionView[List](List)
+ implicit val _2 = new CompanionIterableView[List](List)
"satisfy gentraversablelike examples" in { genTraversableLikeExamples }
"satisfy traversable examples" in { traversableExamples }
+ "satisfy iterableviewlike examples" in { iterableViewLikeExamples }
}
"using range views" in {
implicit val _ = new GenericCompanionRangeView[List](List)
+ implicit val _2 = new CompanionIterableRangeView[List](List)
"satisfy gentraversablelike examples" in { genTraversableLikeExamples }
"satisfy traversable examples" in { traversableExamples }
+ "satisfy iterableviewlike examples" in { iterableViewLikeExamples }
}
}
}
@@ -3,7 +3,7 @@ package com.bizo.scala.collection.immutable
import org.specs._
import com.bizo.scala.collection._
-object SeqSpec extends TraversableSpec {
+object SeqSpec extends TraversableSpec with IterableViewSpec {
override val isOrdered = true
@@ -15,14 +15,18 @@ object SeqSpec extends TraversableSpec {
"satisfy traversable examples" in { traversableExamples }
}
"using views" in {
- implicit val _ = new GenericCompanionView[Seq](Seq)
+ implicit val _1 = new GenericCompanionView[Seq](Seq)
+ implicit val _2 = new CompanionIterableView[Seq](Seq)
"satisfy gentraversablelike examples" in { genTraversableLikeExamples }
"satisfy traversable examples" in { traversableExamples }
+ "satisfy iterableviewlike examples" in { iterableViewLikeExamples }
}
"using range views" in {
implicit val _ = new GenericCompanionRangeView[Seq](Seq)
+ implicit val _2 = new CompanionIterableRangeView[Seq](Seq)
"satisfy gentraversablelike examples" in { genTraversableLikeExamples }
"satisfy traversable examples" in { traversableExamples }
+ "satisfy iterableviewlike examples" in { iterableViewLikeExamples }
}
}
@@ -3,7 +3,7 @@ package com.bizo.scala.collection.mutable
import org.specs._
import com.bizo.scala.collection._
-object ArrayBufferSpec extends TraversableSpec {
+object ArrayBufferSpec extends TraversableSpec with IterableViewSpec {
override val isOrdered = true
@@ -15,14 +15,18 @@ object ArrayBufferSpec extends TraversableSpec {
"satisfy traversable examples" in { traversableExamples }
}
"using views" in {
- implicit val _ = new GenericCompanionView[ArrayBuffer](ArrayBuffer)
+ implicit val _1 = new GenericCompanionView[ArrayBuffer](ArrayBuffer)
+ implicit val _2 = new CompanionIterableView[ArrayBuffer](ArrayBuffer)
"satisfy gentraversablelike examples" in { genTraversableLikeExamples }
"satisfy traversable examples" in { traversableExamples }
+ "satisfy iterableviewlike examples" in { iterableViewLikeExamples }
}
"using range views" in {
implicit val _ = new GenericCompanionRangeView[ArrayBuffer](ArrayBuffer)
+ implicit val _2 = new CompanionIterableRangeView[ArrayBuffer](ArrayBuffer)
"satisfy gentraversablelike examples" in { genTraversableLikeExamples }
"satisfy traversable examples" in { traversableExamples }
+ "satisfy iterableviewlike examples" in { iterableViewLikeExamples }
}
}
@@ -3,7 +3,7 @@ package com.bizo.scala.collection.mutable
import org.specs._
import com.bizo.scala.collection._
-object HashSetSpec extends TraversableSpec with SetLikeSpec {
+object HashSetSpec extends TraversableSpec with SetLikeSpec with IterableViewSpec {
"mutable HashSets" should {
import scala.collection.mutable.HashSet
@@ -15,14 +15,18 @@ object HashSetSpec extends TraversableSpec with SetLikeSpec {
"satisfy setlike examples" in { setLikeExamples[HashSet] }
}
"using views" in {
- implicit val _ = new GenericCompanionView[HashSet](HashSet)
+ implicit val _1 = new GenericCompanionView[HashSet](HashSet)
+ implicit val _2 = new CompanionIterableView[HashSet](HashSet)
"satisfy gentraversablelike examples" in { genTraversableLikeExamples }
"satisfy traversable examples" in { traversableExamples }
+ "satisfy iterableviewlike examples" in { iterableViewLikeExamples }
}
"using range views" in {
- implicit val _ = new GenericCompanionRangeView[HashSet](HashSet)
+ implicit val _1 = new GenericCompanionRangeView[HashSet](HashSet)
+ implicit val _2 = new CompanionIterableRangeView[HashSet](HashSet)
"satisfy gentraversablelike examples" in { genTraversableLikeExamples }
"satisfy traversable examples" in { traversableExamples }
+ "satisfy iterableviewlike examples" in { iterableViewLikeExamples }
}
}

0 comments on commit bcf219e

Please sign in to comment.