Commit 10904833 authored by zeiss's avatar zeiss
Browse files

No commit message

No commit message
parent 8c19a303
Loading
Loading
Loading
Loading
+34 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 61 $
 ** @purpose  1:8.2.3.2, Ensure that constants listed as exceptions in imported groups are not accessible.
 ** @verdict  pass reject
 *****************************************************************/

module NegSem_08020303_ImportingGroups_001 {

import from NegSem_08020303_ImportingGroups_001 {
	group CONST_GROUP except {
		const c_myotherconst;
	}
};

testcase TC_NegSem_08020303_ImportingGroups_001() runs on GeneralComp {
	if (c_myotherconst == 123456) { // c_myotherconst is excluded and shall not be accessible
		setverdict(fail);
	} else {
		setverdict(pass);
	}
}

control{
    execute(TC_NegSem_08020303_ImportingGroups_001());
}
}

module NegSem_08020303_ImportingGroups_001_import {
	group CONST_GROUP {
		const integer c_myconst := 43532;
		const integer c_myotherconst := 123456;
	}
}
+32 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 61 $
 ** @purpose  1:8.2.3.2, Ensure that a const defined in a group can be accessed if the group is imported.
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/


module Sem_08020303_ImportingGroups_001 {

import from Sem_08020303_ImportingGroups_001_import {
	group CONST_GROUP;
};

testcase TC_Sem_08020303_ImportingGroups_001() runs on GeneralComp {
	if (c_myconst == 43532) {
		setverdict(pass);
	} else {
		setverdict(fail);
	}
}

control{
    execute(TC_Sem_08020303_ImportingGroups_001());
}
}

module Sem_08020303_ImportingGroups_import {
	group CONST_GROUP {
		const integer c_myconst := 43532;
	}
}
+39 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 61 $
 ** @purpose  1:8.2.3.2, Ensure that import with exceptions does not exclude imports, but that it is in fact a shortcut notation for explicit imports.
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

module Sem_08020303_ImportingGroups_002 {

import from Sem_08020303_ImportingGroups_002_import {
	group CONST_GROUP except {
		const c_myconst;
	};
	const all;
	group CONST_INNER_GROUP except {
		const c_myconst;
	};	
}

testcase TC_Sem_08020303_ImportingGroups_002() runs on GeneralComp {
	if (c_myconst == 49532) {
		setverdict(fail);
	} else {
		setverdict(pass);
	}
}

control{
    execute(TC_Sem_08020303_ImportingGroups_002());
}
}

module Sem_08020303_ImportingGroups_002_import {
	group CONST_GROUP {
		group CONST_INNER_GROUP {
			const integer c_myconst := 43532;
		}
	}
}