Re: [Haskell-cafe] ANNOUNCE: doctest-0.3.0
Hi Herbert, > I was wondering whether doctest could somehow be integrated with > Haskell's test-framework[1] and/or HTF package[2], as an additional > test-provider, as I tend to write trivial test-cases as haddock comments > but more extensive ones as dedicated unit-tests. This would be possible > with Python's `nose` testing-framework[3] > > Do You have any suggestions/ideas how that could be accomplished? We have a ticket for that, I hope this will get into the next release. Cheers, Simon [1] https://github.com/sol/doctest-haskell/issues/1 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANNOUNCE: doctest-0.3.0
On Thu, 2011-06-16 at 20:22 +0200, Simon Hengel wrote: > doctest is a port of Python's doctest[2] to Haskell. It can be used to > verify, that examples in Haddock comments[3] do still work. This also > provides you with a simple mechanism to write unit test, without the > burden of maintaining a dedicated test suite. I was wondering whether doctest could somehow be integrated with Haskell's test-framework[1] and/or HTF package[2], as an additional test-provider, as I tend to write trivial test-cases as haddock comments but more extensive ones as dedicated unit-tests. This would be possible with Python's `nose` testing-framework[3] Do You have any suggestions/ideas how that could be accomplished? cheers, hvr [1] http://hackage.haskell.org/package/test-framework-0.4.0 [2] http://hackage.haskell.org/package/HTF [3] http://code.google.com/p/python-nose/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANNOUNCE: doctest-0.3.0
On 17 June 2011 14:36, Luke Palmer wrote: > On Thu, Jun 16, 2011 at 12:22 PM, Simon Hengel > wrote: >> >> I just uploaded a new version of doctest[1] to Hackage. > > Sweet! > >> >> I think usingĀ all lower-case package names is a good thing. > > I'm just curious -- why? One reason: if that's the convention, then you don't have the problem of "how do I list that package in my .cabal file, is it doctest, Doctest or DocTest?" Also, some distro package managers prefer lowercase package names. -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANNOUNCE: doctest-0.3.0
On Thu, Jun 16, 2011 at 12:22 PM, Simon Hengel wrote: > I just uploaded a new version of doctest[1] to Hackage. > Sweet! > I think using all lower-case package names is a good thing. I'm just curious -- why? Luke ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANNOUNCE: doctest-0.3.0
I just uploaded a new version of doctest[1] to Hackage. WHAT IS doctest? doctest is a port of Python's doctest[2] to Haskell. It can be used to verify, that examples in Haddock comments[3] do still work. This also provides you with a simple mechanism to write unit test, without the burden of maintaining a dedicated test suite. A basic example of usage is at [4]. WHAT'S NEW IN THIS VERSION? === It is now possible to intersperse comments between a longer, continuing example. All examples within the same comment now share a namespace. The following now works : -- | Calculate Fibonacci number of given 'Num'. -- -- First let's set `n` to ten: -- -- >>> let n = 10 -- -- And now calculate the 10th Fibonacci number: -- -- >>> fib n -- 55 fib :: Integer -> Integer fib 0 = 0 fib 1 = 1 fib n = fib (n - 1) + fib (n - 2) Thanks to Sakari Jokinen for this contribution! In addition I changed the name from DocTest to doctest. I think using all lower-case package names is a good thing. And as we will use doctest as a library in the near future, this was the last chance for this change. Cheers, Simon [1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/doctest [2] http://docs.python.org/library/doctest.html [3] http://www.haskell.org/haddock/doc/html/ch03s08.html#id566093 [4] http://haskell.org/haskellwiki/DocTest ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe