conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 06_types_and_values / 0601_basic_types_and_values / 060102_subtyping_of_basic_types / 06010206_mixing_subtyping_mechanisms / 0601020602_using_length_restriction_with_other_constraints / Sem_0601020602_StringMixing_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.2.6.2, Assign values to pattern restricted character strings using @nocase modifier
13 ** @verdict pass accept, ttcn3verdict:pass
14 ***************************************************/
15
16 /* The following requirements are tested:
17 When the "@nocase" modifier is used after the pattern keyword, the matching is evaluated in a case insensitive way
18 */
19
20 module Sem_0601020602_StringMixing_007 {
21 type charstring unicharString (pattern "[a-z]#(1,5)") length (1..5); // charstring between "a".."z" and length from 1 to 5
22 type charstring unicharString_nocase (pattern @nocase "[a-z]#(1,5)") length (1..5); // with @nocase modifier now characters from "A...Z" is also allowed
23
24 type component GeneralComp {}
25
26 testcase TC_Sem_0601020602_StringMixing_007() runs on GeneralComp {
27 var unicharString v_a; //without @nocase modifier
28 var unicharString_nocase v_b; //with @nocase modifier
29 v_a :="abxyz";
30 v_b :=v_a; //v_b :="abxyz";
31 v_b :="AbXyZ";
32
33 setverdict(pass,"The result is: ",v_b);
34 }
35
36 control{
37 execute(TC_Sem_0601020602_StringMixing_007());
38 }
39 }
This page took 0.042853 seconds and 5 git commands to generate.