summary refs log tree commit diff
diff options
context:
space:
mode:
authorsternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2021-02-20 15:57:09 +0100
committerVincent Laporte <vbgl@users.noreply.github.com>2021-02-21 17:16:17 +0100
commit2f96b9a7b4c083edf79374ceb9d61b5816648276 (patch)
tree51db7c322e29f8f3f442621f05ebc366065bda26
parent4287f5adfa8cc4be5031d1dcef1ac0cde47a7ae5 (diff)
downloadnixpkgs-2f96b9a7b4c083edf79374ceb9d61b5816648276.tar
nixpkgs-2f96b9a7b4c083edf79374ceb9d61b5816648276.tar.gz
nixpkgs-2f96b9a7b4c083edf79374ceb9d61b5816648276.tar.bz2
nixpkgs-2f96b9a7b4c083edf79374ceb9d61b5816648276.tar.lz
nixpkgs-2f96b9a7b4c083edf79374ceb9d61b5816648276.tar.xz
nixpkgs-2f96b9a7b4c083edf79374ceb9d61b5816648276.tar.zst
nixpkgs-2f96b9a7b4c083edf79374ceb9d61b5816648276.zip
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
-rw-r--r--pkgs/development/ocaml-modules/qcheck/core.nix4
-rw-r--r--pkgs/development/ocaml-modules/stdint/default.nix10
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;