aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/test/diameter_util.erl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2012-11-19 15:47:39 +0100
committerAnders Svensson <[email protected]>2012-11-19 15:47:39 +0100
commit1ecc870573b37491e9dd7965d29d20efea557c01 (patch)
treeb78d75446981e43bf62e662fd79abc077a0616ca /lib/diameter/test/diameter_util.erl
parent608ae226acd4c6340c66ce6038436f849b735673 (diff)
parent42a9dfb10de174c13a204e035992720a02c9751f (diff)
downloadotp-1ecc870573b37491e9dd7965d29d20efea557c01.tar.gz
otp-1ecc870573b37491e9dd7965d29d20efea557c01.tar.bz2
otp-1ecc870573b37491e9dd7965d29d20efea557c01.zip
Merge branch 'anders/diameter/R15B03_release/OTP-10582' into maint
* anders/diameter/R15B03_release/OTP-10582: vsn -> 1.3 Update appup for R15B03 Dialyzer fix Insert missing 1.1 release notes Minor test suite tweaks vsn -> 1.2.1 Update appup for OTP-10461/10550
Diffstat (limited to 'lib/diameter/test/diameter_util.erl')
-rw-r--r--lib/diameter/test/diameter_util.erl18
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/diameter/test/diameter_util.erl b/lib/diameter/test/diameter_util.erl
index 890d24f6f8..5af4ad9ba5 100644
--- a/lib/diameter/test/diameter_util.erl
+++ b/lib/diameter/test/diameter_util.erl
@@ -24,7 +24,8 @@
%%
%% generic
--export([consult/2,
+-export([name/1,
+ consult/2,
run/1,
fold/3,
foldl/3,
@@ -45,6 +46,21 @@
-define(L, atom_to_list).
+
+%% ---------------------------------------------------------------------------
+%% name/2
+%%
+%% Contruct and deconstruct lists of atoms as atoms to work around
+%% group names in common_test being restricted to atoms.
+
+name(Names)
+ when is_list(Names) ->
+ list_to_atom(string:join([atom_to_list(A) || A <- Names], ","));
+
+name(A)
+ when is_atom(A) ->
+ [list_to_atom(S) || S <- string:tokens(atom_to_list(A), ",")].
+
%% ---------------------------------------------------------------------------
%% consult/2
%%