Skip to content

Commit

Permalink
Test that fromFullPaths does not throw a StackOverflowError
Browse files Browse the repository at this point in the history
  • Loading branch information
dianaamfr committed Nov 20, 2024
1 parent a58c57f commit b6b6cc4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions circe/src/test/scala/com/kevel/apso/circe/ImplicitsSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ class ImplicitsSpec extends Specification {

res mustEqual expectedJson
}

"not throw a StackOverflowError for large lists of paths" in {
val paths = (1 to 10000).map(i => (s"a.v$i", i.asJson)).toList
fromFullPaths(paths, ".") must not(throwAn[StackOverflowError])
}
}

"provide a method to get the key set of a JSON Object" in {
Expand Down

0 comments on commit b6b6cc4

Please sign in to comment.