Browse Source

test names

Anton Lebedevich 13 years ago
parent
commit
1ec0a1bd6f
1 changed files with 12 additions and 2 deletions
  1. 12 2
      test_src/pgsql_tests.erl

+ 12 - 2
test_src/pgsql_tests.erl

@@ -621,7 +621,7 @@ all_test_() ->
     Tests =
         lists:map(
           fun({Name, _}) ->
-                  fun(X) -> ?MODULE:Name(X) end
+                  {Name, fun(X) -> ?MODULE:Name(X) end}
           end,
           lists:filter(
             fun({Name, Arity}) ->
@@ -631,7 +631,17 @@ all_test_() ->
                     end
             end,
             ?MODULE:module_info(functions))),
-    {with, pgsql, Tests}.
+    WithParameter =
+        fun(Module) ->
+                lists:map(
+                  fun({Name, Test}) ->
+                          {lists:flatten(
+                             io_lib:format("~s(~s)", [Name, Module])),
+                           fun() -> Test(Module) end}
+                  end,
+                  Tests)
+        end,
+    WithParameter(pgsql).
 
 %% -- internal functions --