Re: Spec & test.check generators for complex data structures

2016-11-01 Thread Alex Miller
The general approach to this is to first create a "model" of your domain, which might be some random seed info and then generate one or more entities that are consistent with the model. Stu does a simple example of this in http://blog.cognitect.com/blog/2016/8/10/clojure-spec-screencast-customi

Re: Spec & test.check generators for complex data structures

2016-11-01 Thread Maarten Truyens
Thanks - the start of that thread was indeed interesting, but it quickly changed course towards a discussion on whether Spec should check function outputs. Rich hinted at exactly the kind of in-depth discussion I wanted to find — but much too briefly... -- You received this message because yo

Re: Spec & test.check generators for complex data structures

2016-11-01 Thread Josh Tilles
I don’t have any answers, but you might find the discussion in the first several messages of this thread to be relevant. On Tuesday, November 1, 2016 at 3:14:28 PM UTC-4, Maarten Truyens wrote: > > Completely convinced of Spec,

Spec & test.check generators for complex data structures

2016-11-01 Thread Maarten Truyens
Completely convinced of Spec, I am diving into property-based testing with test.check. However, I encounter some difficulties for which I would like to get the community's input. The central part of the software I am developing, consists of a tree of different kinds of nodes that can refer to