From 8429ee374325a6a2c9779c5001c143ce4b35b1c6 Mon Sep 17 00:00:00 2001 From: Brad Anderson Date: Mon, 15 Mar 2010 16:11:33 -0400 Subject: more work on mem3 init, handling different types of joins, requiring more human-intervention, reworking startargs to strip out most everything --- test/mem3_test.erl | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 test/mem3_test.erl (limited to 'test') diff --git a/test/mem3_test.erl b/test/mem3_test.erl new file mode 100644 index 00000000..6286936e --- /dev/null +++ b/test/mem3_test.erl @@ -0,0 +1,38 @@ +-module(mem3_test). + +-include("../include/common.hrl"). +-include_lib("eunit/include/eunit.hrl"). + +%% TEST SETUP + +all_tests_test_() -> + {"membership3 tests", + [ + {setup, + fun test_setup/0, + fun test_teardown/1, + fun(Pid) -> + {with, Pid, + [ + fun init/1 + ]} + end} + ] + }. + + +test_setup() -> + {ok, Pid} = mem3:start_link(test), + Pid. + + +test_teardown(Pid) -> + exit(Pid, shutdown). + + +%% TESTS + +init(_Pid) -> + State = #mem{test=Test} = mem3:state(), + ?debugFmt("~nState: ~p~n", [State]), + ?assertEqual(true, Test). -- cgit v1.2.3