From c624f844d5fb940464479021c6b0a2f87ca03401 Mon Sep 17 00:00:00 2001 From: Peter Tseng Date: Mon, 8 May 2017 20:15:50 -0700 Subject: [PATCH] pov 1.1.1.3: simplify "Can find path from nodes other than x" This was the main change in https://github.com/exercism/x-common/pull/704 https://github.com/exercism/x-common/pull/710 is an inconsequential change that does not affect our tests. Two other changes in 1.1.0 that aren't exactly followed: * As a part of conforming to the canonical schema, trees were embedded into the test data, but we have no need to do it - let's reduce duplication, and besides we are safe from accidental mutation. * The "cannot trace" cases were changed to use simpler trees than cousins, but we would have had to introduce another tree to do that (one with kids and siblings). We'll stick with cousins. --- exercises/pov/package.yaml | 2 +- exercises/pov/test/Tests.hs | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/exercises/pov/package.yaml b/exercises/pov/package.yaml index dcbb5be88..b0d67fc94 100644 --- a/exercises/pov/package.yaml +++ b/exercises/pov/package.yaml @@ -1,5 +1,5 @@ name: pov -version: 1.0.0.2 +version: 1.1.1.3 dependencies: - base diff --git a/exercises/pov/test/Tests.hs b/exercises/pov/test/Tests.hs index 88f22db8d..9a9744bc9 100644 --- a/exercises/pov/test/Tests.hs +++ b/exercises/pov/test/Tests.hs @@ -68,14 +68,11 @@ specs = describe "pov" $ do , "uncle" , "cousin-1" ] - it "Can trace from a leaf to a leaf" $ - tracePathBetween "kid-a" "cousin-0" cousins - `shouldBe` Just [ "kid-a" - , "x" - , "parent" - , "grandparent" - , "uncle" - , "cousin-0" ] + it "Can find path from nodes other than x" $ + tracePathBetween "a" "c" flat + `shouldBe` Just [ "a" + , "root" + , "c" ] it "Cannot trace if destination does not exist" $ tracePathBetween "x" "NOT THERE" cousins