1 /******************************************************************************
2 * Copyright (c) 2000-2015 Ericsson Telecom AB
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 ******************************************************************************/
10 import from schemas_ericsson_com_pg_hlr_13_5 all;
14 external function enc_imsi(in ImsiType i) return octetstring
15 with { extension "prototype(convert) encode(XER:XER_EXTENDED)" }
17 const charstring c_cali := "<imsiType xmlns='http://schemas.ericsson.com/pg/hlr/13.5/'>califragilistic</imsiType>\n\n";
18 const octetstring o_cali := char2oct(c_cali);
20 const charstring c_all := "<imsiType xmlns='http://schemas.ericsson.com/pg/hlr/13.5/'>ALL</imsiType>\n\n";
21 const octetstring o_all := char2oct(c_all);
23 // Go through the motions with one type.
24 // The point of this test is to chec that xsd2ttcn does not crash.
25 testcase tc1() runs on C
27 var ImsiType v_imsi := { alt_ := "califragilistic" };
28 var octetstring o := enc_imsi(v_imsi);
30 if (match(o, o_cali)) { setverdict(pass); }
31 else { setverdict(fail, match(o, o_cali)); }
33 v_imsi := { alt_1 := aLL }
34 o := enc_imsi(v_imsi);
36 if (match(o, o_all)) { setverdict(pass); }
37 else { setverdict(fail, match(o, o_all)); }