Skip to content

Commit

Permalink
Initial eqc test.
Browse files Browse the repository at this point in the history
  • Loading branch information
massung committed Jan 13, 2012
1 parent 6ee0fa2 commit aa16aa3
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions test/session_eqc.erl
@@ -0,0 +1,38 @@
-module(session_eqc).

-ifdef(EQC).

%% EQC headers
-include_lib("eqc/include/eqc_statem.hrl").
-include_lib("eqc/include/eqc.hrl").

%% public api
-compile(export_all).

-define(SESSION(F), {call,riak_control_session,F,[]}).

%% ====================================================================
%% Tests
%% ====================================================================


initial_state () ->
not_running.


next_state (not_running,{ok,Pid},?SESSION(start_link)) ->
test_nodes;
next_state (test_nodes,_,?SESSION(get_nodes)) ->
shutdown.


command (not_running) -> ?SESSION(start_link);
command ({test_nodes,Pid}) -> ?SESSION(get_nodes).


precondition (_,_) -> true.
postcondition (_,_,_) -> true.


%% -? EQC
-endif.

0 comments on commit aa16aa3

Please sign in to comment.