Commit Graph

6 Commits

Author SHA1 Message Date
Harald Welte 002365d895 map_codec_tests: Adapt to new xua_codec based m2ua_codec 2013-01-26 16:40:50 +01:00
Harald Welte 21c6b94271 MAP: Fix-up after asn1ct automatic 1990->1994 EXTERNAL conversion
So what the Erlang asn1ct does is:  Decode the incoming EXTERNAL type,
convert it to the 1994 format and hand it to the user program.

The encoder is opposite:  Take what the user supplies (in our case 1994)
and then transform it to 1990 before handing it to the actual encoder function.

The only problem is: The 1994 format does only support OCTET STRING as actual
embedded data type, whereas the 1990 format can also indicate
'singla-asn1-type', i.e. a constructed type.

So since that information is already lost before we ever get the record from
the Erlang asn1 decoder, it will be re-encoded as OCTET STRING :(

Until this is fixed in the asn1ct/asn1rt code, we have to use this workaround...
2011-04-16 20:14:38 +02:00
Harald Welte 2ad4626282 eunit: make test case comply with new MAP codec 2011-04-06 15:46:55 +02:00
Harald Welte 3575d44ee7 MAP codec test: Always try to re-encode and assert verbously in case of error 2011-03-12 10:23:10 +01:00
Harald Welte 49525f8af8 Add MAP codec PCAP based testing
You need to provide your own ./priv/map.pcap file to run the test.

Results from a real SIGTRAN link:
test/map_codec_tests.erl:49: PCAP: 191.795 s
test/map_codec_tests.erl:50: Parsed 807605 PCAP packets
2011-03-11 18:47:23 +01:00
Harald Welte c60e8405a5 add eunit tests for map codec 2011-03-08 23:02:32 +01:00