Skip to content
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

Decrease stack-safety test size #1760

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
4 changes: 2 additions & 2 deletions tests/src/test/scala/cats/tests/ReaderWriterStateTTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ class ReaderWriterStateTTests extends CatsSuite {
}

test("Traversing with ReaderWriterState is stack-safe") {
val ns = (0 to 100000).toList
val ns = (0 to 70000).toList
val rws = ns.traverse(_ => addLogUnit(1))

rws.runS("context", 0).value should === (100001)
rws.runS("context", 0).value should === (70001)
}

test("map2 combines logs") {
Expand Down
4 changes: 2 additions & 2 deletions tests/src/test/scala/cats/tests/StateTTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ class StateTTests extends CatsSuite {
}

test("traversing state is stack-safe"){
val ns = (0 to 100000).toList
val ns = (0 to 70000).toList
val x = ns.traverse(_ => add1)
x.runS(0).value should === (100001)
x.runS(0).value should === (70001)
}

test("State.pure and StateT.pure are consistent"){
Expand Down