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:6.3.3, Ensure that the IUT correctly handles component incompatibility due to differing list of constant definitions
13 ** @verdict pass reject
14 ***************************************************/
16 module NegSem_060303_component_types_001 {
18 type integer ConstrainedInteger(0..10);
20 type component TestCaseComp {
21 const integer c_integer:=2;
24 type component FunctionComp {
25 const integer c_integer:=2;
26 const ConstrainedInteger c_constrained:=2;
29 function f_testFunction(integer p_arg) runs on FunctionComp return integer {
32 v_result:=p_arg*c_integer;
36 testcase TC_NegSem_060303_component_types_001() runs on TestCaseComp {
40 v_int := f_testFunction(v_int);
41 // runs on mtc with type TestCaseComp
42 // f_testFunction needs to run on FunctionComp
43 // which has 2 variables not 1 as TestCaseComp
44 setverdict (fail, "ERROR expected: function runs on mtc with type TestCaseComp f_testFunction needs to run on FunctionComp which has 2 variables not 1 as TestCaseComp");
48 execute(TC_NegSem_060303_component_types_001());