Skip to content
thejohnfreeman edited this page Jan 2, 2013 · 1 revision

check is the meat and potatoes of AutoCheck:

  template <
    typename... Args,
    typename Property,
    typename Arbitrary = arbitrary<std::tuple<Args...>>
  >
  void check(
      size_t max_tests,
      const Property& prop,
      Arbitrary&& arb = Arbitrary(),
      reporter&& rep = ostream_reporter(),
      classifier<Args...>&& cls = classifier<Args...>());

Examples in test.

  • Args... : The argument types of the property to test. These must be specified and cannot be inferred.
  • max_tests : The number of successful tests to shoot for.
  • prop : The property to test. Should model bool (Args...).
  • arb : The test case generator. Should model Arbitrary.
  • rep : The success/failure reporter. Should inherit from [[reporter]].
  • cls : The distribution classifier. Must be a [[classifier]].

check will test prop with test cases from arb until it is exhausted or passes max_tests. Each test case will be passed through cls for classification. After, it will report results through rep.

Clone this wiki locally