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 | * Raduly, Csaba | |
11 | * | |
970ed795 EL |
12 | ******************************************************************************/ |
13 | module gtpctest { | |
14 | import from GTPv2_Types all; | |
15 | ||
16 | type component gtp {} | |
17 | ||
18 | const octetstring input := '482400410000831E00CB9A00490001000556000D001842F099460142F09900007B014D000200080057001900CA0AF000011F00080A20011B70828834080000000000000009'O | |
19 | ||
20 | testcase dec() runs on gtp | |
21 | { | |
22 | var PDU_GTPCv2 gtpc := dec_PDU_GTPCv2(input); | |
23 | log(gtpc); | |
24 | if (ispresent(gtpc.gtpcv2_pdu.deleteSessionRequest.fullyQualifiedTEID)) { setverdict(pass); } | |
25 | else { setverdict(fail); } | |
26 | ||
27 | var octetstring reencode := enc_PDU_GTPCv2(gtpc); | |
28 | if (reencode != input) { setverdict(fail, "decode+encode does not match original"); } | |
29 | } | |
30 | ||
31 | control { | |
32 | execute(dec()); | |
33 | } | |
34 | ||
35 | } |