From 2f96b9a7b4c083edf79374ceb9d61b5816648276 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Sat, 20 Feb 2021 15:57:09 +0100 Subject: [PATCH] ocamlPackages.qcheck*: 0.16 -> 0.17 * New exposed function, bug fixes: https://github.com/c-cube/qcheck/blob/0.17/CHANGELOG.md#017 * Fix a too liberal testing range causing an integer overflow in stdint which for some reason only qcheck 0.17 and not 0.16 seems to find --- pkgs/development/ocaml-modules/qcheck/core.nix | 4 ++-- pkgs/development/ocaml-modules/stdint/default.nix | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/development/ocaml-modules/qcheck/core.nix b/pkgs/development/ocaml-modules/qcheck/core.nix index 03de70237a4..e1b3503b541 100644 --- a/pkgs/development/ocaml-modules/qcheck/core.nix +++ b/pkgs/development/ocaml-modules/qcheck/core.nix @@ -2,7 +2,7 @@ buildDunePackage rec { pname = "qcheck-core"; - version = "0.16"; + version = "0.17"; useDune2 = true; @@ -12,7 +12,7 @@ buildDunePackage rec { owner = "c-cube"; repo = "qcheck"; rev = version; - sha256 = "1s5dpqj8zvd3wr2w3fp4wb6yc57snjpxzzfv9fb6l9qgigswwjdr"; + sha256 = "0qfyqhfg98spmfci9z6f527a16gwjnx2lrbbgw67p37ys5acrfar"; }; meta = { diff --git a/pkgs/development/ocaml-modules/stdint/default.nix b/pkgs/development/ocaml-modules/stdint/default.nix index c849ffee479..52d97e12998 100644 --- a/pkgs/development/ocaml-modules/stdint/default.nix +++ b/pkgs/development/ocaml-modules/stdint/default.nix @@ -21,14 +21,18 @@ buildDunePackage rec { }) ]; - # disable remaining broken tests, see - # https://github.com/andrenth/ocaml-stdint/issues/59 + # 1. disable remaining broken tests, see + # https://github.com/andrenth/ocaml-stdint/issues/59 + # 2. fix tests to liberal test range + # https://github.com/andrenth/ocaml-stdint/pull/61 postPatch = '' substituteInPlace tests/stdint_test.ml \ --replace 'test "An integer should perform left-shifts correctly"' \ 'skip "An integer should perform left-shifts correctly"' \ --replace 'test "Logical shifts must not sign-extend"' \ - 'skip "Logical shifts must not sign-extend"' + 'skip "Logical shifts must not sign-extend"' \ + --replace 'let pos_int = QCheck.map_same_type abs in_range' \ + 'let pos_int = QCheck.int_range 0 maxi' ''; doCheck = true;