diff options
author | Björn Gustavsson <[email protected]> | 2013-09-30 10:09:16 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2013-09-30 10:09:16 +0200 |
commit | b4f5a3a238cc726b215c6c34484d4cb5299aff33 (patch) | |
tree | 78ce067f01ae9a2e4ecdfa25f5bcd49f9738bbd4 /lib/asn1/test/asn1_SUITE.erl | |
parent | 8f8c00f77779f5d47642e6decddf298d2f8e2254 (diff) | |
parent | 0f430abcb189988a7faf55386557b2b74afa6f56 (diff) | |
download | otp-b4f5a3a238cc726b215c6c34484d4cb5299aff33.tar.gz otp-b4f5a3a238cc726b215c6c34484d4cb5299aff33.tar.bz2 otp-b4f5a3a238cc726b215c6c34484d4cb5299aff33.zip |
Merge branch 'maint'
* maint:
Teach the ASN.1 compiler the no_ok_wrapper option
Optimize the generated decode/2 function
Diffstat (limited to 'lib/asn1/test/asn1_SUITE.erl')
-rw-r--r-- | lib/asn1/test/asn1_SUITE.erl | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/lib/asn1/test/asn1_SUITE.erl b/lib/asn1/test/asn1_SUITE.erl index a558a2941f..61b360ddf2 100644 --- a/lib/asn1/test/asn1_SUITE.erl +++ b/lib/asn1/test/asn1_SUITE.erl @@ -297,7 +297,15 @@ cover(_) -> testPrim(Config) -> test(Config, fun testPrim/3). testPrim(Config, Rule, Opts) -> - asn1_test_lib:compile_all(["Prim", "Real"], Config, [Rule|Opts]), + Files = ["Prim","Real"], + asn1_test_lib:compile_all(Files, Config, [Rule|Opts]), + do_test_prim(Rule, false), + asn1_test_lib:compile_all(Files, Config, [no_ok_wrapper,Rule|Opts]), + do_test_prim(Rule, true). + +do_test_prim(Rule, NoOkWrapper) -> + io:format("No ok wrapper: ~p\n", [NoOkWrapper]), + put(no_ok_wrapper, NoOkWrapper), testPrim:bool(Rule), testPrim:int(Rule), testPrim:enum(Rule), @@ -925,10 +933,14 @@ testNortel(Config, Rule, Opts) -> test_undecoded_rest(Config) -> test(Config, fun test_undecoded_rest/3). test_undecoded_rest(Config, Rule, Opts) -> + do_test_undecoded_rest(Config, Rule, Opts), + do_test_undecoded_rest(Config, Rule, [no_ok_wrapper|Opts]), + do_test_undecoded_rest(Config, Rule, [undec_rest|Opts]), + do_test_undecoded_rest(Config, Rule, [no_ok_wrapper,undec_rest|Opts]). + +do_test_undecoded_rest(Config, Rule, Opts) -> asn1_test_lib:compile("P-Record", Config, [Rule|Opts]), - ok = test_undecoded_rest:test([], Config), - asn1_test_lib:compile("P-Record", Config, [Rule,undec_rest|Opts]), - test_undecoded_rest:test(undec_rest, Config). + test_undecoded_rest:test(Opts, Config). testTcapsystem(Config) -> test(Config, fun testTcapsystem/3). |