|
28 | 28 |
|
29 | 29 | -module(proper_tests). |
30 | 30 |
|
31 | | --include("compile_flags.hrl"). |
| 31 | +-include("proper_internal.hrl"). |
32 | 32 | -include("proper.hrl"). |
33 | 33 |
|
34 | 34 | -include_lib("eunit/include/eunit.hrl"). |
@@ -1038,9 +1038,23 @@ options_test_() -> |
1038 | 1038 | [{constraint_tries,0}], true), |
1039 | 1039 | ?_failsWith([12], |
1040 | 1040 | ?FORALL(_,?SIZED(Size,integer(Size,Size)),false), |
1041 | | - [{start_size,12}]), |
1042 | | - ?_failsWith([2762], ?FORALL(_,integer(),false), |
1043 | | - [{seed,{1526,530081,919799}},noshrink,{start_size,65536}])]. |
| 1041 | + [{start_size,12}])]. |
| 1042 | + |
| 1043 | +seeded_test_() -> |
| 1044 | + Seed = {1526,530081,919799}, |
| 1045 | + SomeInt = case ?RANDOM_MOD of |
| 1046 | + rand -> 2762; |
| 1047 | + random -> 156399 |
| 1048 | + end, |
| 1049 | + F = fun () -> |
| 1050 | + %% proper_arith:rand_start(Seed), |
| 1051 | + %% io:format(user, "\n>>> ~p\n", [get(?SEED_NAME)]), |
| 1052 | + %% put(my_seed,get(?SEED_NAME)), |
| 1053 | + fun() -> ok end |
| 1054 | + end, |
| 1055 | + Opts = [{seed,Seed}, noshrink, {start_size,65536}], |
| 1056 | + [?_failsWith([SomeInt], ?SETUP(F,?FORALL(_,integer(),false)), Opts) |
| 1057 | + ].%%,?_assertEqual(Seed, erase(my_seed))]. |
1044 | 1058 |
|
1045 | 1059 | setup_prop() -> |
1046 | 1060 | ?SETUP(fun () -> |
|
0 commit comments