Skip to content

fix(test): fixes scala-exercises/exercises-stdlib#31 #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/scala/stdlib/Traversables.scala
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ object Traversables extends FlatSpec with Matchers with exercise.Section {

/** `toStream` will convert any *Traversable* to a `Stream` which is a lazy list where elements are evaluated as they are needed.
*/
def toStreamFunctionTraversables(res0: Boolean, res1: List[Int]) {
def toStreamFunctionTraversables(res0: Boolean, res1: Stream[Int]) {
val list = List(4, 6, 7, 8, 9, 13, 14)
val result = list.toStream
result.isInstanceOf[Stream[_]] should be(res0)
Expand Down
2 changes: 1 addition & 1 deletion src/test/scala/exercises/stdlib/TraversablesSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class TraversablesSpec extends Spec with Checkers {
check(
Test.testSuccess(
Traversables.toStreamFunctionTraversables _,
true :: List(4, 6, 7) :: HNil
true :: Stream(4, 6, 7) :: HNil
)
)
}
Expand Down