From c8712bf4dce949c270fbbfed3acc2ad956e74a86 Mon Sep 17 00:00:00 2001 From: Andy Scott Date: Wed, 10 Jan 2018 18:52:26 -0800 Subject: [PATCH] Add missing .unorderedTraverse syntax --- core/src/main/scala/cats/syntax/traverse.scala | 4 +++- tests/src/test/scala/cats/tests/TraverseSuite.scala | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/core/src/main/scala/cats/syntax/traverse.scala b/core/src/main/scala/cats/syntax/traverse.scala index 9205507f3b7..4a5dc2acd58 100644 --- a/core/src/main/scala/cats/syntax/traverse.scala +++ b/core/src/main/scala/cats/syntax/traverse.scala @@ -1,4 +1,6 @@ package cats package syntax -trait TraverseSyntax extends Traverse.ToTraverseOps +trait TraverseSyntax + extends Traverse.ToTraverseOps + with UnorderedTraverse.ToUnorderedTraverseOps diff --git a/tests/src/test/scala/cats/tests/TraverseSuite.scala b/tests/src/test/scala/cats/tests/TraverseSuite.scala index b912201a9bc..ab7efc08b8b 100644 --- a/tests/src/test/scala/cats/tests/TraverseSuite.scala +++ b/tests/src/test/scala/cats/tests/TraverseSuite.scala @@ -74,3 +74,11 @@ class TraverseSuiteAdditional extends CatsSuite { checkZipWithIndexedStackSafety[Vector](_.toVector) } } + +class UnorderedTraverseSuite extends CatsSuite { + test("UnorderedTraverse[Set[Int]].unorderedTraverse via syntax") { + forAll { (ins: Set[Int]) => + ins.unorderedTraverse(in => in: Id[Int]).toList.sorted should === (ins.toList.sorted) + } + } +}