From e660dd48e78f1a368010bbcf4455b576dd59d7c1 Mon Sep 17 00:00:00 2001 From: Brad Anderson Date: Thu, 5 Aug 2010 13:41:53 -0400 Subject: n_val tests for mem3_util --- test/partitions_test.erl | 53 ------------------------------------------------ 1 file changed, 53 deletions(-) delete mode 100644 test/partitions_test.erl (limited to 'test/partitions_test.erl') diff --git a/test/partitions_test.erl b/test/partitions_test.erl deleted file mode 100644 index 834719b7..00000000 --- a/test/partitions_test.erl +++ /dev/null @@ -1,53 +0,0 @@ --module(partitions_test). --author('brad@cloudant.com'). - --include("../include/config.hrl"). --include("../include/common.hrl"). --include_lib("eunit/include/eunit.hrl"). - --define(FOUR_NODES, [a,b,c,d]). --define(Map1, [{d,0}, - {a,292300327466180583640736966543256603931186508596}, - {b,584600654932361167281473933086513207862373017192}, - {c,876900982398541750922210899629769811793559525788}, - {d,1169201309864722334562947866173026415724746034384}]). --define(Map2, [{c,0}, - {d,182687704666362864775460604089535377456991567873}, - {a,365375409332725729550921208179070754913983135746}, - {b,548063113999088594326381812268606132370974703619}, - {c,730750818665451459101842416358141509827966271492}, - {d,913438523331814323877303020447676887284957839365}, - {a,1096126227998177188652763624537212264741949407238}, - {b,1278813932664540053428224228626747642198940975111}]). --define(Map3, [{d,0}, - {c,0}, - {a,365375409332725729550921208179070754913983135745}, - {d,365375409332725729550921208179070754913983135745}, - {b,730750818665451459101842416358141509827966271490}, - {a,730750818665451459101842416358141509827966271490}, - {c,1096126227998177188652763624537212264741949407235}, - {b,1096126227998177188652763624537212264741949407235}]). - -%%==================================================================== -%% Tests -%%==================================================================== - -fullmap_n1_test() -> - Map1 = partitions:fullmap(<<"test">>, ?FOUR_NODES, opts(1,5)), - ?assertEqual(?Map1, Map1), - Map2 = partitions:fullmap(<<"boorad">>, ?FOUR_NODES, opts(1,8)), - ?assertEqual(?Map2, Map2), - ok. - -fullmap_Ngt1_test() -> - Map3 = partitions:fullmap(<<"boorad">>, ?FOUR_NODES, opts(2,4)), - ?assertEqual(?Map3, Map3), - ok. - - -%%==================================================================== -%% Internal functions -%%==================================================================== - -opts(N,Q) -> - [{n,integer_to_list(N)},{q,integer_to_list(Q)}]. -- cgit v1.2.3