Sync with 5.4.0
[deliverable/titan.core.git] / regression_test / XML / xsdConverter / HQ48576 / HQ48576Test.ttcn
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 ******************************************************************************/
8 module HQ48576Test
9 {
10 import from schemas_ericsson_com_pg_hlr_13_5 all;
11
12 type component C {}
13
14 external function enc_imsi(in ImsiType i) return octetstring
15 with { extension "prototype(convert) encode(XER:XER_EXTENDED)" }
16
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);
19
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);
22
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
26 {
27 var ImsiType v_imsi := { alt_ := "califragilistic" };
28 var octetstring o := enc_imsi(v_imsi);
29 action(o);
30 if (match(o, o_cali)) { setverdict(pass); }
31 else { setverdict(fail, match(o, o_cali)); }
32
33 v_imsi := { alt_1 := aLL }
34 o := enc_imsi(v_imsi);
35 action(o);
36 if (match(o, o_all)) { setverdict(pass); }
37 else { setverdict(fail, match(o, o_all)); }
38 }
39
40 control {
41 execute(tc1());
42 }
43
44 }
45
This page took 0.048456 seconds and 5 git commands to generate.