aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/test/diameter_codec_test.erl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2017-06-11 13:59:02 +0200
committerAnders Svensson <[email protected]>2017-06-13 13:50:07 +0200
commit205521d3927ed6f53c9a6fa3095f8a879bdca929 (patch)
tree7eda323ec84c0cb19bd55dd95735636bc08c6c11 /lib/diameter/test/diameter_codec_test.erl
parentcac106defc5060c5e485480e8003b992482d751d (diff)
downloadotp-205521d3927ed6f53c9a6fa3095f8a879bdca929.tar.gz
otp-205521d3927ed6f53c9a6fa3095f8a879bdca929.tar.bz2
otp-205521d3927ed6f53c9a6fa3095f8a879bdca929.zip
Move (most of) diameter_gen.hrl to diameter_gen.erl
To remove the requirement that dictionary modules be recompiled whenever the encode/decode implementation changes. The included diameter_gen.hrl now only contains trivial functions that call info diameter_gen.erl.
Diffstat (limited to 'lib/diameter/test/diameter_codec_test.erl')
-rw-r--r--lib/diameter/test/diameter_codec_test.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/diameter/test/diameter_codec_test.erl b/lib/diameter/test/diameter_codec_test.erl
index ccb97615da..b548f85cb8 100644
--- a/lib/diameter/test/diameter_codec_test.erl
+++ b/lib/diameter/test/diameter_codec_test.erl
@@ -171,7 +171,7 @@ gen(M, avp_types, {Name, Code, Type, _Flags}) ->
V = undefined /= VendorId,
V = 0 /= Flags band 2#10000000,
{Name, Type} = M:avp_name(Code, VendorId),
- B = M:empty_value(Name),
+ B = M:empty_value(Name, #{module => M}),
B = z(B),
[] = avp_decode(M, Type, Name);
@@ -215,7 +215,8 @@ avp(Mod, encode = X, V, Name, _) ->
iolist_to_binary(Mod:avp(X, V, Name, opts(Mod))).
opts(Mod) ->
- (opts())#{dictionary => Mod}.
+ (opts())#{module => Mod,
+ dictionary => Mod}.
opts() ->
#{string_decode => true,