Commit | Line | Data |
---|---|---|
970ed795 | 1 | /****************************************************************************** |
3abe9331 | 2 | * Copyright (c) 2000-2015 Ericsson Telecom AB |
970ed795 EL |
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 HS16977_Test { | |
9 | import from HS16977_Constants all; | |
10 | import from HS16977_Types all; | |
11 | ||
12 | external function ef_enc(in t_outer_rec pl_pdu, out octetstring pl_stream) with { | |
13 | extension "prototype(fast)"; | |
14 | extension "encode(RAW)"; | |
15 | } | |
16 | ||
17 | external function ef_dec(in octetstring pl_stream, out t_outer_rec pl_pdu) with { | |
18 | extension "prototype(fast)"; | |
19 | extension "decode(RAW)"; | |
20 | } | |
21 | ||
22 | type component CT_empty {}; | |
23 | ||
24 | testcase tc_hs16977() runs on CT_empty { | |
25 | var t_outer_rec v_initial := { | |
26 | len := 10, | |
27 | inner := { | |
28 | obj_type := c_outer_choice, | |
29 | len := 6, | |
30 | val := { | |
31 | outer := { | |
32 | len := 4, | |
33 | inner := { | |
34 | obj_type := c_float_choice, | |
35 | len := 2, | |
36 | val := { f := 3.14 } | |
37 | } | |
38 | } | |
39 | } | |
40 | } | |
41 | }; | |
42 | ||
43 | var octetstring v_coded; | |
44 | ef_enc(v_initial, v_coded); | |
45 | ||
46 | var t_outer_rec v_result; | |
47 | ef_dec(v_coded, v_result); | |
48 | ||
49 | if (v_result == v_initial) { setverdict(pass); } | |
50 | else { setverdict(fail); } | |
51 | } | |
52 | ||
53 | control { | |
54 | execute(tc_hs16977()); | |
55 | } | |
56 | ||
57 | } with { | |
58 | encode "RAW"; | |
59 | } |