Skip to content

Commit

Permalink
Merge pull request #520 from fitztrev/golf-2
Browse files Browse the repository at this point in the history
Scala golf - NodeTest conditional
  • Loading branch information
lenguyenthanh authored Mar 21, 2024
2 parents a2c8efb + e7b3e79 commit c05b3f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test-kit/src/test/scala/NodeTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ class NodeTest extends ScalaCheckSuite:
def modifyChild(node: Tree[Int]) =
node.withChild(node.child.map(c => c.withValue(f(c.value)))).some

if node.find(path).flatMap(_.child).isDefined then
node.find(path).flatMap(_.child).isDefined ==> {
node.modifyAt(path, modifyChild) == node.modifyChildAt(path, _.updateValue(f).some)
else true
}

test("mergeOrAddAsVariation size"):
forAll: (node: Node[Foo], other: Node[Foo]) =>
Expand Down

0 comments on commit c05b3f1

Please sign in to comment.