/****************************************************************************** * Copyright (c) 2000-2021 Ericsson Telecom AB * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 * which accompanies this distribution, and is available at * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html * * Contributors: * Balasko, Jeno * Raduly, Csaba * ******************************************************************************/ module HQ48576Test { import from schemas_ericsson_com_pg_hlr_13_5 all; type component C {} external function enc_imsi(in ImsiType i) return octetstring with { extension "prototype(convert) encode(XER:XER_EXTENDED)" } external function dec_imsi(in octetstring stream) return ImsiType with { extension "prototype (convert) decode(XER:XER_EXTENDED)" } const charstring c_cali := "califragilistic\n\n"; const octetstring o_cali := char2oct(c_cali); const charstring c_all := "ALL\n\n"; const octetstring o_all := char2oct(c_all); // Go through the motions with one type. // The point of this test is to chec that xsd2ttcn does not crash. testcase tc1() runs on C { var ImsiType v_result; var ImsiType v_imsi := { alt_ := "califragilistic" }; var octetstring o := enc_imsi(v_imsi); action(o); if (match(o, o_cali)) { setverdict(pass); } else { setverdict(fail, match(o, o_cali)); } v_result := dec_imsi(o); if (match(v_result, v_imsi)) { setverdict(pass); } else { setverdict(fail, match(v_result, v_imsi)); } v_imsi := { alt_1 := aLL } o := enc_imsi(v_imsi); action(o); if (match(o, o_all)) { setverdict(pass); } else { setverdict(fail, match(o, o_all)); } v_result := dec_imsi(o); // Will be encoded into the first field (alt_) var charstring all_ := "ALL"; v_imsi := { alt_ := all_ } if (match(v_result, v_imsi)) { setverdict(pass); } else { setverdict(fail, match(v_result, v_imsi)); } } control { execute(tc1()); } }