Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
f573c54849 | ||
|
ba868ff309 | ||
|
56ae6629e2 | ||
|
de1ad57108 | ||
|
522e4d7ff6 |
36
0001-Fixes-distribution-and-min_int-issues.patch
Normal file
36
0001-Fixes-distribution-and-min_int-issues.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
From 99a5f108681271f50f31fe3988db0f94b5779c2b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jan Midtgaard <jmid@mmmi.sdu.dk>
|
||||||
|
Date: Thu, 12 Nov 2020 12:43:23 +0100
|
||||||
|
Subject: [PATCH 1/2] Fixes distribution and min_int issues
|
||||||
|
|
||||||
|
---
|
||||||
|
src/core/QCheck.ml | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/core/QCheck.ml b/src/core/QCheck.ml
|
||||||
|
index 5a3a3e6..67d6e3a 100644
|
||||||
|
--- a/src/core/QCheck.ml
|
||||||
|
+++ b/src/core/QCheck.ml
|
||||||
|
@@ -162,7 +162,7 @@ module Gen = struct
|
||||||
|
else fun st -> let r = pint st in r mod (n + 1)
|
||||||
|
let int_range a b =
|
||||||
|
if b < a then invalid_arg "Gen.int_range";
|
||||||
|
- if a >= 0 || b <= 0 then (
|
||||||
|
+ if a >= 0 || b < 0 then (
|
||||||
|
(* range smaller than max_int *)
|
||||||
|
assert (b-a >= 0);
|
||||||
|
fun st -> a + (int_bound (b-a) st)
|
||||||
|
@@ -171,8 +171,8 @@ module Gen = struct
|
||||||
|
choose the itv wrt to their size ratio *)
|
||||||
|
fun st ->
|
||||||
|
let f_a = float_of_int a in
|
||||||
|
- let ratio = (-.f_a) /. (float_of_int b -. f_a) in
|
||||||
|
- if Random.float 1. < ratio then - (int_bound (abs a) st)
|
||||||
|
+ let ratio = (-.f_a) /. (1. +. float_of_int b -. f_a) in
|
||||||
|
+ if Random.State.float st 1. <= ratio then - (Gen.int_bound (- (a+1)) st) - 1
|
||||||
|
else int_bound b st
|
||||||
|
)
|
||||||
|
|
||||||
|
--
|
||||||
|
2.28.0
|
||||||
|
|
25
0002-rm-needless-.Gen.patch
Normal file
25
0002-rm-needless-.Gen.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From 7616e43b4d011ef90e7e20f47e9837c660d8428f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jan Midtgaard <jmid@mmmi.sdu.dk>
|
||||||
|
Date: Thu, 12 Nov 2020 12:47:28 +0100
|
||||||
|
Subject: [PATCH 2/2] rm needless .Gen
|
||||||
|
|
||||||
|
---
|
||||||
|
src/core/QCheck.ml | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/core/QCheck.ml b/src/core/QCheck.ml
|
||||||
|
index 67d6e3a..f05f73c 100644
|
||||||
|
--- a/src/core/QCheck.ml
|
||||||
|
+++ b/src/core/QCheck.ml
|
||||||
|
@@ -172,7 +172,7 @@ module Gen = struct
|
||||||
|
fun st ->
|
||||||
|
let f_a = float_of_int a in
|
||||||
|
let ratio = (-.f_a) /. (1. +. float_of_int b -. f_a) in
|
||||||
|
- if Random.State.float st 1. <= ratio then - (Gen.int_bound (- (a+1)) st) - 1
|
||||||
|
+ if Random.State.float st 1. <= ratio then - (int_bound (- (a+1)) st) - 1
|
||||||
|
else int_bound b st
|
||||||
|
)
|
||||||
|
|
||||||
|
--
|
||||||
|
2.28.0
|
||||||
|
|
@ -1,11 +1,15 @@
|
|||||||
Name: ocaml-qcheck
|
Name: ocaml-qcheck
|
||||||
Version: 0.17
|
Version: 0.16
|
||||||
Release: 4%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: QuickCheck inspired property-based testing for OCaml
|
Summary: QuickCheck inspired property-based testing for OCaml
|
||||||
|
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: https://c-cube.github.io/qcheck/
|
URL: https://github.com/c-cube/qcheck
|
||||||
Source0: https://github.com/c-cube/qcheck/archive/%{version}/%{name}-%{version}.tar.gz
|
Source0: https://github.com/c-cube/qcheck/archive/%{version}/%{name}-%{version}.tar.gz
|
||||||
|
# Upstream patch to fix https://github.com/c-cube/qcheck/issues/100
|
||||||
|
Patch0: 0001-Fixes-distribution-and-min_int-issues.patch
|
||||||
|
# Small fix to the previous patch
|
||||||
|
Patch1: 0002-rm-needless-.Gen.patch
|
||||||
|
|
||||||
BuildRequires: ocaml >= 4.03.0
|
BuildRequires: ocaml >= 4.03.0
|
||||||
BuildRequires: ocaml-dune
|
BuildRequires: ocaml-dune
|
||||||
@ -57,6 +61,8 @@ find _build/default/_doc/_html -name .dune-keep -delete
|
|||||||
# These files will be installed using doc and license directives.
|
# These files will be installed using doc and license directives.
|
||||||
rm -r %{buildroot}%{_prefix}/doc
|
rm -r %{buildroot}%{_prefix}/doc
|
||||||
|
|
||||||
|
# Makes *.cmxs executable such that they will be stripped.
|
||||||
|
find %{buildroot} -name '*.cmxs' -exec chmod 0755 {} \;
|
||||||
|
|
||||||
%check
|
%check
|
||||||
dune runtest --no-buffer --profile release
|
dune runtest --no-buffer --profile release
|
||||||
@ -102,34 +108,21 @@ dune runtest --no-buffer --profile release
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Apr 14 2021 Jerry James <loganjerry@gmail.com> - 0.17-4
|
|
||||||
- Rebuild for alcotest 1.4.0
|
|
||||||
|
|
||||||
* Mon Mar 1 23:22:40 GMT 2021 Richard W.M. Jones <rjones@redhat.com> - 0.17-3
|
|
||||||
- OCaml 4.12.0 build
|
|
||||||
|
|
||||||
* Sat Feb 20 2021 Jerry James <loganjerry@gmail.com> - 0.17-2
|
|
||||||
- Rebuild for alcotest 1.3.0
|
|
||||||
|
|
||||||
* Tue Feb 16 2021 Jerry James <loganjerry@gmail.com> - 0.17-1
|
|
||||||
- Version 0.17
|
|
||||||
- Drop upstream patches
|
|
||||||
|
|
||||||
* Tue Feb 2 2021 Jerry James <loganjerry@gmail.com> - 0.16-4
|
|
||||||
- Bump and rebuild for updated ocaml-alcotest dep
|
|
||||||
|
|
||||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.16-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Dec 2 2020 Jerry James <loganjerry@gmail.com> - 0.16-2
|
* Wed Dec 2 2020 Jerry James <loganjerry@gmail.com> - 0.16-2
|
||||||
- Add upstream patches to fix numeric range issues
|
- Add upstream patches to fix numeric range issues
|
||||||
|
|
||||||
|
* Thu Nov 12 2020 Jerry James <loganjerry@gmail.com> - 0.16-1.1
|
||||||
|
- Rebuild to fix broken ocaml-fmt dependency
|
||||||
|
|
||||||
* Thu Nov 5 2020 Jerry James <loganjerry@gmail.com> - 0.16-1
|
* Thu Nov 5 2020 Jerry James <loganjerry@gmail.com> - 0.16-1
|
||||||
- Version 0.16
|
- Version 0.16
|
||||||
|
|
||||||
* Fri Sep 25 2020 Jerry James <loganjerry@gmail.com> - 0.15-1
|
* Fri Sep 25 2020 Jerry James <loganjerry@gmail.com> - 0.15-1
|
||||||
- Version 0.15
|
- Version 0.15
|
||||||
|
|
||||||
|
* Wed Sep 02 2020 Richard W.M. Jones <rjones@redhat.com> - 0.14-4.1
|
||||||
|
- Bump release and rebuild.
|
||||||
|
|
||||||
* Tue Sep 01 2020 Richard W.M. Jones <rjones@redhat.com> - 0.14-4
|
* Tue Sep 01 2020 Richard W.M. Jones <rjones@redhat.com> - 0.14-4
|
||||||
- OCaml 4.11.1 rebuild
|
- OCaml 4.11.1 rebuild
|
||||||
|
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (ocaml-qcheck-0.17.tar.gz) = 647c1beefba8fce32daac91bd42976ddf2926cff2e78e43ac3afb6e59ec660f0f6e684f5954d6b1fab6d11328690b236e40c30980a22a999c4b826ae2a0dcaea
|
SHA512 (ocaml-qcheck-0.16.tar.gz) = eb9f08cdad479399347ae7771f610d58622d45af79ae9e46d3267da7d3c197cb9d1ea57fafa6af5f1fcd0e360282f72c183dd0f6ba47329536c5523661eb40e8
|
||||||
|
Loading…
Reference in New Issue
Block a user