From: Michael Orlitzky Date: Sat, 9 Jul 2011 00:26:34 +0000 (-0400) Subject: Re-enable the non-doc tests. X-Git-Tag: 0.0.1~261 X-Git-Url: http://gitweb.michael.orlitzky.com/?p=spline3.git;a=commitdiff_plain;h=26f0a2204a0bdb41b1d6aa5430544c404b77e638 Re-enable the non-doc tests. Add a doctest for the flatten function. --- diff --git a/src/Misc.hs b/src/Misc.hs index 48482b4..34c682e 100644 --- a/src/Misc.hs +++ b/src/Misc.hs @@ -25,6 +25,12 @@ factorial n -- | Takes a three-dimensional list, and flattens it into a -- one-dimensional one. +-- +-- Examples: +-- +-- >>> flatten [ [[1,2], [3,4]], [[5,6], [7,8]] ] +-- [1,2,3,4,5,6,7,8] +-- flatten :: [[[a]]] -> [a] flatten xs = concat $ concat xs diff --git a/test/TestSuite.hs b/test/TestSuite.hs index 7f49670..756bcf3 100644 --- a/test/TestSuite.hs +++ b/test/TestSuite.hs @@ -19,7 +19,7 @@ import Tests.Tetrahedron as TT main :: IO () main = do dt <- docTest ["src/Everything.hs"] ["-isrc"] - defaultMain $ [dt] -- ++ tests + defaultMain $ [dt] ++ tests -- | Defined so that my test names fit on one line. tc :: Test.Framework.Providers.API.TestName -> Test.HUnit.Assertion -> Test.Framework.Test