On Tue, Feb 24, 2009 at 5:00 AM, James Reeves
<weavejes...@googlemail.com> wrote:
>
> On Feb 24, 3:11 am, "Michel S." <michel.syl...@gmail.com> wrote:
>> I started Quiche after taking a look at Fact, actually; the difference
>> between what I'm proposing and Fact is that the latter is a standalone
>> test framework, whereas the random-testing part of Quiche (property)
>> and Fact (fact) could, IMHO, be built on top of test-is.
>
> I originally planned to build Fact on top of test-is, but there were
> other parts of test-is I wanted to change, such as how test failures
> were reported, so I created a separate library.
>
> I don't think there's much overlap between Fact and test-is, insofar
> as a function to test a predicate against a sequence of values is
> relatively simple to make. For test-is, I'd be tempted to create
> something like this:
>
> (deftest foo
>  (for-all [x random-int, y random-int]
>    (> (+ x y) x))
>


> IMO, for-all is more descriptive than 'property', and fits better with
> 'is' as a name. However, because this uses asserts, it doesn't fit in
> with Fact's predicate system.
for-all does look clearer than 'property', especially since the
generating functions are made explicit (unlike in, say, Haskell's QC).


> The only complicated part of Fact is its ability to generate random
> test data from regular expressions, but I've already split that out
> into a library called re-rand.

This part could, perhaps, be merged into clojure-contrib?

Thanks,

-- 
miʃel salim  •  http://hircus.jaiku.com/
IUCS         •  msa...@cs.indiana.edu
Fedora       •  sali...@fedoraproject.org
MacPorts     •  hir...@macports.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to