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