diff options
author | Anders Svensson <[email protected]> | 2011-12-16 16:19:06 +0100 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2011-12-16 18:27:20 +0100 |
commit | fba96f493b940f032bc238492a9375ad6397dbe4 (patch) | |
tree | 7506c1415e636c1b4b088bb4591c7dffa0f9b2b3 /lib/diameter/test/diameter_compiler_SUITE.erl | |
parent | d486873f661e8e22b355c9f12edb726a6832d84d (diff) | |
download | otp-fba96f493b940f032bc238492a9375ad6397dbe4.tar.gz otp-fba96f493b940f032bc238492a9375ad6397dbe4.tar.bz2 otp-fba96f493b940f032bc238492a9375ad6397dbe4.zip |
Move example dictionaries to examples/dict
Diffstat (limited to 'lib/diameter/test/diameter_compiler_SUITE.erl')
-rw-r--r-- | lib/diameter/test/diameter_compiler_SUITE.erl | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/diameter/test/diameter_compiler_SUITE.erl b/lib/diameter/test/diameter_compiler_SUITE.erl index f12fba3654..3b4c9706e0 100644 --- a/lib/diameter/test/diameter_compiler_SUITE.erl +++ b/lib/diameter/test/diameter_compiler_SUITE.erl @@ -32,7 +32,7 @@ -export([format/1, format/2, replace/1, replace/2, generate/1, generate/4, generate/0, - standards/1, standards/0]). + examples/1, examples/0]). -export([dict/0]). %% fake dictionary module @@ -328,13 +328,13 @@ "@codecs mymod " "Origin-Host Origin-Realm\n&"}]}]). -%% Standard dictionaries. --define(STANDARDS, [rfc4004_mip, - rfc4005_nas, - rfc4006_cc, - rfc4072_eap, - rfc4590_digest, - rfc4740_sip]). +%% Standard dictionaries in examples/dict. +-define(EXAMPLES, [rfc4004_mip, + rfc4005_nas, + rfc4006_cc, + rfc4072_eap, + rfc4590_digest, + rfc4740_sip]). %% =========================================================================== @@ -345,7 +345,7 @@ all() -> [format, replace, generate, - standards]. + examples]. %% Error handling testcases will make an erroneous dictionary out of %% the base dictionary and check that the expected error results. @@ -432,18 +432,18 @@ generate(Mods, Bin, N, Mode) -> andalso ({ok, _} = compile:file(File ++ ".erl", [return_errors])). %% =========================================================================== -%% standards/1 +%% examples/1 %% %% Compile dictionaries extracted from various standards. -standards() -> - [{timetrap, {seconds, 3*length(?STANDARDS)}}]. +examples() -> + [{timetrap, {seconds, 3*length(?EXAMPLES)}}]. -standards(Config) -> - Data = proplists:get_value(data_dir, Config), - [D || D <- ?STANDARDS, _ <- [standards(?S(D), Data)]]. +examples(_Config) -> + Dir = filename:join([code:lib_dir(diameter, examples), "dict"]), + [D || D <- ?EXAMPLES, _ <- [examples(?S(D), Dir)]]. -standards(Dict, Dir) -> +examples(Dict, Dir) -> {Name, Pre} = make_name(Dict), ok = diameter_make:codec(filename:join([Dir, Dict ++ ".dia"]), [{name, Name}, |