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:10, Ensure that index notation of a field in a set of type, which actual value is null shall cause an error
13 ** @verdict pass reject
14 ***************************************************/
16 /* The following requirements are tested:
17 Using the dot notation and index notation for referencing a field, alternative or element of an address value, which actual value is null shall cause an
21 module NegSem_10_Constants_005 {
25 type set of address MySetofInt;
27 type component GeneralComp {
30 testcase TC_NegSem_10_Constants_005() runs on GeneralComp {
32 var MySetofInt R1:= {[0] := null};
35 const default C2 := R2; //allowed
36 const integer C1 := R1[0]; //error
38 if (match(C1,R1[0])) { setverdict(pass,"match") }
39 else { setverdict(fail) }
43 execute(TC_NegSem_10_Constants_005());