Test 2

Simple Machines 23rd November, 2016


  1. The return value should be a map with the two keys :codebreaker/exact-matches and :codebreaker/loose-matches
  2. the values should be natural (i.e. non-negative) integers
  3. the sum of the values should be >= 0
  4. the sum of the values should be <= the number of pegs in the secret code
  5. We’ll express all of these properties using clojure.spec, and we’re also going to describe the arguments to the function using the same tooling. This is one way in clojure.spec departs from other property-based testing tools.