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(testChoTypeRefSeq). 22 23-export([seq/1]). 24 25-include_lib("common_test/include/ct.hrl"). 26 27-record('ChoSeq', {seqInt, seqOs}). 28-record('ChoSeqImp', {seqInt, seqOs}). 29-record('ChoSeqExp', {seqInt, seqOs}). 30 31seq(_Rules) -> 32 roundtrip('ChoTRseq', {choSeq,#'ChoSeq'{seqInt=88, 33 seqOs = <<"A string">>}}), 34 roundtrip('ChoTRseq', {choSeqI,#'ChoSeq'{seqInt=88, 35 seqOs = <<"A string">>}}), 36 roundtrip('ChoTRseq', {choSeqE,#'ChoSeq'{seqInt=88, 37 seqOs = <<"A string">>}}), 38 roundtrip('ChoTRseq', {'choSeq-I',#'ChoSeqImp'{seqInt=88, 39 seqOs = <<"A string">>}}), 40 roundtrip('ChoTRseq', {'choSeqI-I',#'ChoSeqImp'{seqInt=88, 41 seqOs = <<"A string">>}}), 42 roundtrip('ChoTRseq', {'choSeqE-I',#'ChoSeqImp'{seqInt=88, 43 seqOs = <<"A string">>}}), 44 roundtrip('ChoTRseq', {'choSeq-E',#'ChoSeqExp'{seqInt=88, 45 seqOs = <<"A string">>}}), 46 roundtrip('ChoTRseq', {'choSeqI-E',#'ChoSeqExp'{seqInt=88, 47 seqOs = <<"A string">>}}), 48 roundtrip('ChoTRseq', {'choSeqE-E',#'ChoSeqExp'{seqInt=88, 49 seqOs = <<"A string">>}}), 50 ok. 51 52roundtrip(Type, Value) -> 53 asn1_test_lib:roundtrip('ChoTypeRefSeq', Type, Value). 54