/******************************************************************************
* Copyright (c) 2000-2015 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
******************************************************************************/
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)" }
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_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_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)); }
}
control {
execute(tc1());
}
}