Added test for ByteString.compact to ByteStringSpec
This commit is contained in:
parent
5b83dc366e
commit
3c9409a4b0
1 changed files with 3 additions and 1 deletions
|
|
@ -163,7 +163,9 @@ class ByteStringSpec extends WordSpec with MustMatchers with Checkers {
|
|||
"be sequential" when {
|
||||
"taking" in { check((a: ByteString, b: ByteString) ⇒ (a ++ b).take(a.size) == a) }
|
||||
"dropping" in { check((a: ByteString, b: ByteString) ⇒ (a ++ b).drop(a.size) == b) }
|
||||
|
||||
}
|
||||
"be equal to the original" when {
|
||||
"compacting" in { check { xs: ByteString ⇒ val ys = xs.compact; (xs == ys) && ys.isCompact } }
|
||||
"recombining" in {
|
||||
check { (xs: ByteString, from: Int, until: Int) ⇒
|
||||
val (tmp, c) = xs.splitAt(until)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue