Blob Blame History Raw
From 4211bdd9d68cd32c9ffbdc77a5443b97eba999b4 Mon Sep 17 00:00:00 2001
From: Fedora Build <lemenkov@gmail.com>
Date: Wed, 5 Sep 2012 15:13:22 +0400
Subject: [PATCH 1/2] No such types in R12B - dict() and boolean()

Signed-off-by: Fedora Build <lemenkov@gmail.com>
---
 src/meck.erl | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/meck.erl b/src/meck.erl
index 1669c32..3e9c136 100644
--- a/src/meck.erl
+++ b/src/meck.erl
@@ -68,11 +68,11 @@
 
 %% Records
 -record(state, {mod :: atom(),
-                expects :: dict(),
-                valid = true :: boolean(),
+                expects :: term(),
+                valid = true :: bool(),
                 history = [] :: history(),
                 original :: term(),
-                was_sticky :: boolean()}).
+                was_sticky :: bool()}).
 
 %% Includes
 -include("meck_abstract.hrl").
@@ -233,7 +233,7 @@ exception(Class, Reason) when Class == throw; Class == error; Class == exit ->
 -spec passthrough(Args::[term()]) -> no_return().
 passthrough(Args) -> throw(passthrough_fun(Args)).
 
-%% @spec validate(Mod:: atom() | list(atom())) -> boolean()
+%% @spec validate(Mod:: atom() | list(atom())) -> bool()
 %% @doc Validate the state of the mock module(s).
 %%
 %% The function returns `true' if the mocked module(s) has been used
@@ -243,7 +243,7 @@ passthrough(Args) -> throw(passthrough_fun(Args)).
 %% (function clause) or unexpected exceptions.
 %%
 %% Use the {@link history/1} or {@link history/2} function to analyze errors.
--spec validate(Mod:: atom() | [atom()]) -> boolean().
+-spec validate(Mod:: atom() | [atom()]) -> bool().
 validate(Mod) when is_atom(Mod) ->
     call(Mod, validate);
 validate(Mod) when is_list(Mod) ->
@@ -291,7 +291,7 @@ unload() -> lists:foldl(fun unload_if_mocked/2, [], registered()).
 unload(Mod) when is_atom(Mod) -> call(Mod, stop), wait_for_exit(Mod);
 unload(Mods) when is_list(Mods) -> lists:foreach(fun unload/1, Mods), ok.
 
-%% @spec called(Mod:: atom(), Fun:: atom(), Args:: list(term())) -> boolean()
+%% @spec called(Mod:: atom(), Fun:: atom(), Args:: list(term())) -> bool()
 %% @doc Returns whether `Mod:Func' has been called with `Args'.
 %%
 %% @equiv called(Mod, Fun, Args, '_')
@@ -299,7 +299,7 @@ called(Mod, Fun, Args) ->
     has_call({Mod, Fun, Args}, meck:history(Mod)).
 
 %% @spec called(Mod:: atom(), Fun:: atom(), Args:: list(term()),
-%%              Pid::pid()) -> boolean()
+%%              Pid::pid()) -> bool()
 %% @doc Returns whether `Pid' has called `Mod:Func' with `Args'.
 %%
 %% This will check the history for the module, `Mod', to determine
@@ -310,7 +310,7 @@ called(Mod, Fun, Args) ->
 %% atom: ``'_' ''
 %%
 %% @see called/3
--spec called(Mod::atom(), Fun::atom(), Args::list(), Pid::pid()) -> boolean().
+-spec called(Mod::atom(), Fun::atom(), Args::list(), Pid::pid()) -> bool().
 called(Mod, Fun, Args, Pid) ->
     has_call({Mod, Fun, Args}, meck:history(Mod, Pid)).
 
-- 
1.7.11.5