conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 06_types_and_values / 0601_basic_types_and_values / 060101_basic_string_types_and_values / 060101_toplevel / Sem_060101_TopLevel_007.ttcn
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
7 *
8 * Contributors:
9 * Adrien Kirjak – initial implementation
10 *
11 ** @version 0.0.1
12 ** @purpose 1:6.1.1, Assign and read universal charstring using USI like notation
13 ** @verdict pass accept, ttcn3verdict:pass
14 ***************************************************/
15
16 /* The following requirements are tested:
17 The UCS sequence identifier-like (USI-like) notation using their short identifiers of code point. The USI-like notation is composed of the keyword char followed by parentheses. The
18 parentheses enclose a comma-separated list of short identifiers . Each short identifier represents a single
19 character and it shall be composed of a letter U or u followed by an optional "+" PLUS SIGN character,
20 followed by 1..8 hexadecimal digits.
21 */
22
23 module Sem_060101_TopLevel_007 {
24
25 type component GeneralComp {}
26
27 testcase TC_Sem_060101_TopLevel_007() runs on GeneralComp {
28 var universal charstring v_a := char(U0041); //USI notation for character "A"
29 var universal charstring v_b := char(U0171); //USI notation for character "ű"
30 var universal charstring v_c := char(U41); //USI notation for character "A" without leading zeroes
31 var universal charstring v_d := char(U+171,U41); //USI notation for character "ű" and "A" without leading zeroes and + sign notation
32
33
34
35 if (match(v_a,"A") and
36 match(v_b,"ű") and
37 match(v_c,"A") and
38 match(v_d,"űA"))
39 {
40 setverdict(pass,"v_a:",v_a, "v_b:",v_b, "v_c:",v_c,"v_d:",v_d);
41 }
42 else {
43 setverdict(fail,"v_a:",v_a, "v_b:",v_b, "v_c:",v_c,"v_d:",v_d);
44 }
45 }
46
47 control{
48 execute(TC_Sem_060101_TopLevel_007());
49 }
50 }
This page took 0.032567 seconds and 5 git commands to generate.