diff options
Diffstat (limited to 'test/StreamUtilsSpec.scala')
-rw-r--r-- | test/StreamUtilsSpec.scala | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/test/StreamUtilsSpec.scala b/test/StreamUtilsSpec.scala new file mode 100644 index 0000000..b9a710c --- /dev/null +++ b/test/StreamUtilsSpec.scala @@ -0,0 +1,38 @@ +package ixee.cryptopals.test + +import com.ixee.IxeeSpec +import ixee.cryptopals.utils.StreamUtils + +class StreamUtilsSpec extends IxeeSpec { + + "StreamUtils" - { + + ".fromSeq" - { + "is better written as xs.to[Stream]" in { } +/* + "streams the given Seq's elements non-cyclically" in { + + StreamUtils.fromSeq(Seq(1, 2, 3)) mustBe + (1 #:: 2 #:: 3 #:: Stream.empty) + + } +*/ + } + + ".continuous" - { + + "streams the given Seq's elements cyclically" in { + + assert( + StreamUtils.continuous(Seq(1, 2)).startsWith( + Seq(1, 2, 1, 2) + ) + ) + + } + + } + + } + +} |