Skip to content
Browse files

Minor fixes

- export binary/0 in triq.hrl
- eliminate min warnings in R14
  • Loading branch information...
1 parent 0a4bafe commit cabee23e5d51c4b8bb24df7671d2a969f307e72a @krestenkrab committed with eriksoe Mar 9, 2011
Showing with 7 additions and 7 deletions.
  1. +2 −2 include/triq.hrl
  2. +5 −5 src/triq_dom.erl
View
4 include/triq.hrl
@@ -59,8 +59,8 @@
%% import domain functions (a.k.a. generators)
%%
-import(?DOMAIN_MODULE, [list/1, tuple/1, int/0, real/0, elements/1, any/0, atom/0,
- choose/2, bool/0, char/0, oneof/1, return/1, vector/2, binary/1,
- shrink_without_duplicates/1, resize/2, frequency/1]).
+ choose/2, bool/0, char/0, oneof/1, return/1, vector/2, binary/0, binary/1,
+ shrink_without_duplicates/1, resize/2, frequency/1]).
%%
View
10 src/triq_dom.erl
@@ -654,9 +654,9 @@ atom_pick(#?DOM{kind=#atom{size=Size}, empty_ok=EmptyOK}=AtomDom, SampleSize) ->
any ->
case EmptyOK of
true ->
- random:uniform(min(SampleSize,256))-1;
+ random:uniform(xmin(SampleSize,256))-1;
false ->
- random:uniform(min(SampleSize,256))
+ random:uniform(xmin(SampleSize,256))
end;
Size ->
Size
@@ -667,9 +667,9 @@ atom_pick(#?DOM{kind=#atom{size=Size}, empty_ok=EmptyOK}=AtomDom, SampleSize) ->
AtomValue = list_to_atom(foldn(Fun, [], Sz)),
{AtomDom, AtomValue}.
-min(A,B) when A<B -> A;
-min(A,B) when B<A -> B;
-min(A,B) when A==B -> A.
+xmin(A,B) when A<B -> A;
+xmin(A,B) when B<A -> B;
+xmin(A,B) when A==B -> A.
atom_shrink(#?DOM{kind=#atom{size=Size}, empty_ok=EmptyOK}=AtomDom, AtomValue) ->

0 comments on commit cabee23

Please sign in to comment.
Something went wrong with that request. Please try again.