1616
1717let csexp =
1818 let open QCheck2.Gen in
19- let atom = small_string ~gen: printable |> map Yocaml.Sexp. atom in
20- let node self n = small_list (self (n / 10 )) |> map Yocaml.Sexp. node in
19+ let atom = string_small |> map Yocaml.Sexp. atom in
20+ let node self n = list_small (self (n / 10 )) |> map Yocaml.Sexp. node in
2121 fix (fun self -> function
2222 | 0 -> atom
23- | n -> frequency [ (1 , atom); (5 , node self n) ])
23+ | n -> oneof_weighted [ (1 , atom); (5 , node self n) ])
2424 |> sized
2525
2626let alphanumeric =
@@ -32,20 +32,20 @@ let sexp =
3232 let atom =
3333 string_size ~gen: alphanumeric (int_range 1 100 ) |> map Yocaml.Sexp. atom
3434 in
35- let node self n = small_list (self (n / 10 )) |> map Yocaml.Sexp. node in
35+ let node self n = list_small (self (n / 10 )) |> map Yocaml.Sexp. node in
3636 fix (fun self -> function
3737 | 0 -> atom
38- | n -> frequency [ (1 , atom); (5 , node self n) ])
38+ | n -> oneof_weighted [ (1 , atom); (5 , node self n) ])
3939 |> sized
4040
4141let path =
4242 let open QCheck2.Gen in
4343 let fragment =
44- string_size ~gen: (char_range 'a' 'z' ) (int_range 1 10 ) |> small_list
44+ string_size ~gen: (char_range 'a' 'z' ) (int_range 1 10 ) |> list_small
4545 in
4646 let rel = fragment |> map Yocaml.Path. rel in
4747 let abs = fragment |> map Yocaml.Path. abs in
48- frequency [ (5 , rel); (5 , abs) ]
48+ oneof_weighted [ (5 , rel); (5 , abs) ]
4949
5050let deps =
5151 let open QCheck2.Gen in
@@ -56,8 +56,8 @@ let cache_entry =
5656 map3
5757 (fun last_build_date hash deps ->
5858 Yocaml.Cache. entry ?last_build_date hash deps)
59- (opt int )
60- (small_string ~gen: printable)
59+ (option int )
60+ string_small
6161 deps
6262
6363let cache =
@@ -67,4 +67,4 @@ let cache =
6767 let + k = path in
6868 (k, v)
6969 in
70- line |> small_list |> map Yocaml.Cache. from_list
70+ line |> list_small |> map Yocaml.Cache. from_list
0 commit comments