1%% 2%% %CopyrightBegin% 3%% 4%% Copyright Ericsson AB 1997-2016. All Rights Reserved. 5%% 6%% Licensed under the Apache License, Version 2.0 (the "License"); 7%% you may not use this file except in compliance with the License. 8%% You may obtain a copy of the License at 9%% 10%% http://www.apache.org/licenses/LICENSE-2.0 11%% 12%% Unless required by applicable law or agreed to in writing, software 13%% distributed under the License is distributed on an "AS IS" BASIS, 14%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15%% See the License for the specific language governing permissions and 16%% limitations under the License. 17%% 18%% %CopyrightEnd% 19%% 20%% 21-module(testSeqTag). 22 23-export([main/1]). 24 25-include_lib("common_test/include/ct.hrl"). 26-include("External.hrl"). 27 28-record('SeqTag',{nt, imp, exp}). 29-record('SeqTagImp',{nt, imp, exp}). 30-record('SeqTagExp',{nt, imp, exp}). 31-record('SeqTagX',{xnt, ximp, xexp}). 32-record('SeqTagImpX',{xnt, ximp, xexp}). 33-record('SeqTagExpX',{xnt, ximp, xexp}). 34-record('NT',{os, bool}). 35-record('Imp',{os, bool}). 36-record('Exp',{os, bool}). 37 38main(_Rules) -> 39 roundtrip('SeqTag', #'SeqTag'{nt=#'NT'{os = <<"kalle">>,bool=true}, 40 imp=#'Imp'{os = <<"kalle">>,bool=true}, 41 exp=#'Exp'{os = <<"kalle">>,bool=true}}), 42 roundtrip('SeqTagImp', #'SeqTagImp'{nt=#'NT'{os = <<"kalle">>,bool=true}, 43 imp=#'Imp'{os = <<"kalle">>,bool=true}, 44 exp=#'Exp'{os = <<"kalle">>,bool=true}}), 45 roundtrip('SeqTagExp', #'SeqTagExp'{nt=#'NT'{os = <<"kalle">>,bool=true}, 46 imp=#'Imp'{os = <<"kalle">>,bool=true}, 47 exp=#'Exp'{os = <<"kalle">>,bool=true}}), 48 roundtrip('SeqTagX', #'SeqTagX'{xnt=#'XSeqNT'{os = <<"kalle">>,bool=true}, 49 ximp=#'XSeqImp'{os = <<"kalle">>,bool=true}, 50 xexp=#'XSeqExp'{os = <<"kalle">>,bool=true}}), 51 roundtrip('SeqTagImpX', #'SeqTagImpX'{xnt=#'XSeqNT'{os = <<"kalle">>,bool=true}, 52 ximp=#'XSeqImp'{os = <<"kalle">>,bool=true}, 53 xexp=#'XSeqExp'{os = <<"kalle">>,bool=true}}), 54 roundtrip('SeqTagExpX', #'SeqTagExpX'{xnt=#'XSeqNT'{os = <<"kalle">>,bool=true}, 55 ximp=#'XSeqImp'{os = <<"kalle">>,bool=true}, 56 xexp=#'XSeqExp'{os = <<"kalle">>,bool=true}}), 57 ok. 58 59roundtrip(T, V) -> 60 asn1_test_lib:roundtrip('SeqTag', T, V). 61