Skip to content

Commit

Permalink
one more test...
Browse files Browse the repository at this point in the history
  • Loading branch information
johnynek committed Jan 17, 2022
1 parent 62c7da8 commit d79bcfa
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/shared/src/test/scala/cats/parse/RadixNodeTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ class RadixNodeTest extends munit.ScalaCheckSuite {
}
}

property("commonPrefix is finds prefix") {
val sl = RadixNode.commonPrefixSemilattice
forAll { (s0: String, suffix: String) =>
assertEquals(sl.combine(s0, s0 + suffix), s0)
assertEquals(sl.combine(s0 + suffix, s0), s0)
}
}

property("RadixNode.fromStrings(emptyString :: Nil) matches everything") {
val nilRadix = RadixNode.fromStrings("" :: Nil)
forAll { (targ: String) =>
Expand Down

0 comments on commit d79bcfa

Please sign in to comment.