Skip to content

Commit

Permalink
prepare for 0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Sep 18, 2018
1 parent cd87a44 commit 52e4193
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 8 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changes

## 0.9

- add `qcheck-ounit` sublibrary
- use environment variables to configure `qcheck-alcotest` tests
- alcotest backend for qcheck
- make `qcheck.ounit` tests verbose by default
- make `qcheck` is a compatibility library, depends on `qcheck-core`
- split lib into `qcheck` and `qcheck.ounit`
- add `TestResult.is_success` helper
- give access to list of instances in test results
- allow setting `time_between_msg` in runner

- chore: remove submodule
- chore: add travis support
- doc: explanations about qcheck.ounit runners
- doc: update readme

## 0.8

- migrate to jbuilder
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ VERSION=$(shell awk '/^version:/ {print $$2}' qcheck.opam)

update_next_tag:
@echo "update version to $(VERSION)..."
sed -i "s/NEXT_VERSION/$(VERSION)/g" src/*.ml src/*.mli
sed -i "s/NEXT_RELEASE/$(VERSION)/g" src/*.ml src/*.mli
sed -i "s/NEXT_VERSION/$(VERSION)/g" `find src -name '*.ml' -or -name '*.mli'`
sed -i "s/NEXT_RELEASE/$(VERSION)/g" `find src -name '*.ml' -or -name '*.mli'`

release: update_next_tag
@echo "release version $(VERSION)..."
Expand Down
6 changes: 5 additions & 1 deletion src/alcotest/QCheck_alcotest.mli
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@
[QCHECK_VERBOSE] if "1" or "true", will make tests verbose
[QCHECK_SEED] if an integer, will fix the seed
[QCHECK_LONG] is present, will trigger long tests
@since 0.9
*)

val to_alcotest :
?verbose:bool -> ?long:bool -> ?rand:Random.State.t ->
QCheck.Test.t -> unit Alcotest.test_case
(** Convert a qcheck test into an alcotest test
@param verbose used to print information on stdout (default: [verbose()])
@param rand the random generator to use (default: [random_state ()]) *)
@param rand the random generator to use (default: [random_state ()])
@since 0.9
*)
4 changes: 2 additions & 2 deletions src/core/QCheck.mli
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ module TestResult : sig
stats_tbl: ('a stat * (int, int) Hashtbl.t) list; (** @since 0.6 *)
mutable instances: 'a list;
(** List of instances used for this test, in no particular order.
@since NEXT_RELEASE *)
@since 0.9 *)
}

val collect : _ t -> (string,int) Hashtbl.t option
Expand All @@ -633,7 +633,7 @@ module TestResult : sig

val is_success : _ t -> bool
(** Returns true iff the state if [Success]
@since NEXT_RELEASE *)
@since 0.9 *)
end

module Test : sig
Expand Down
5 changes: 4 additions & 1 deletion src/ounit/QCheck_ounit.mli
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@

(** {1 Conversion of tests to OUnit Tests} *)
(** {1 Conversion of tests to OUnit Tests}
@since 0.9
*)

val to_ounit_test :
?verbose:bool -> ?long:bool -> ?rand:Random.State.t ->
Expand Down
4 changes: 2 additions & 2 deletions src/runner/QCheck_base_runner.mli
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ val set_long_tests : bool -> unit

val get_time_between_msg : unit -> float
(** Get the minimum time to wait between printing messages.
@since NEXT_RELEASE *)
@since 0.9 *)

val set_time_between_msg : float -> unit
(** Set the minimum tiem between messages.
@since NEXT_RELEASE *)
@since 0.9 *)

(** {2 Run a Suite of Tests and Get Results} *)

Expand Down

0 comments on commit 52e4193

Please sign in to comment.