Browse Source

merged from ghaskins + eunit test for local mreg

Ulf Wiger 14 years ago
parent
commit
6d2ef4f26e
2 changed files with 7 additions and 3 deletions
  1. 1 1
      test/gproc_dist_tests.erl
  2. 6 2
      test/gproc_tests.erl

+ 1 - 1
test/gproc_dist_tests.erl

@@ -72,7 +72,7 @@ t_simple_reg([H|_] = Ns) ->
     ?assertMatch(ok, t_lookup_everywhere(Name, Ns, undefined)),
     ?assertMatch(ok, t_call(P, die)).
 
-t_mreg([H|_] = Ns) ->
+t_mreg([H|_]) ->
     Kvl = ?T_KVL,
     P = t_spawn_mreg(H, Kvl),
     ?assertMatch(ok, t_call(P, die)).

+ 6 - 2
test/gproc_tests.erl

@@ -102,8 +102,12 @@ t_is_clean() ->
                                         
 
 t_simple_mreg() ->
-    ok.
-
+    P = self(),
+    ?assertEqual(true, gproc:mreg(n, l, [{foo, foo_val},
+					 {bar, bar_val}])),
+    ?assertEqual(P, gproc:where({n,l,foo})),
+    ?assertEqual(P, gproc:where({n,l,bar})).
+    
 
 t_gproc_crash() ->
     P = spawn_helper(),