1 /******************************************************************************
2 * Copyright (c) 2000-2016 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
9 * Adrien Kirjak – initial implementation
12 ** @purpose 1:16.1.2, Ensure that predefined function get_stringencoding works properly
13 ** @verdict pass accept, ttcn3verdict:pass
14 ***************************************************/
16 /* The following requirements are tested:
17 * The get_stringencoding function analyses the encoded_value and returns the UCS encoding scheme.*/
20 module Sem_160102_predefined_functions_081 {
22 type component GeneralComp {
25 testcase TC_Sem_160102_predefined_functions_081 () runs on GeneralComp {
28 var octetstring v_test := '414243C3A9C3BC'O;
29 //UTF-8 encoded octetstring. The decoded value is: ABCéü
31 var charstring v_get := get_stringencoding(v_test); // expected result: "UTF8"
33 if (match(v_get , ("UTF-8","<unknown>"))) {
34 setverdict(pass,"Decoded: ",v_get);
36 setverdict(fail, "Unexpected result: ", v_get);
43 execute(TC_Sem_160102_predefined_functions_081());