Commit d768ad46 authored by zeiss's avatar zeiss
Browse files

No commit message

No commit message
parent f078cc2b
Loading
Loading
Loading
Loading
+29 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 61 $
 ** @purpose  1:8.2.5, Ensure that ...
 ** @verdict  pass reject
 *****************************************************************/

module NegSem_080205_VisibilityOfDefinitions_001 {

import from NegSem_080205_VisibilityOfDefinitions_001_import all;

type component GeneralComp {}

testcase NegSem_080205_VisibilityOfDefinitions_001() runs on GeneralComp {
	if (c_myconst == 43532) { // c_myconst shall not be visible on import as the definition is private.
		setverdict(fail);
	} else {
		setverdict(pass);
	}
}

control{
    execute(TC_NegSem_080205_VisibilityOfDefinitions_001());
}
}

module NegSem_080205_VisibilityOfDefinitions_001_import {
	private const integer c_myconst := 32532;
}
 No newline at end of file
+29 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 61 $
 ** @purpose  1:8.2.4, Ensure that explicitly defined public definitions (in this case a sample constant) are visible when imported.
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

module Sem_080205_VisibilityOfDefinitions_001 {

import from Sem_080205_VisibilityOfDefinitions_001_import all;

type component GeneralComp {}

testcase Sem_080205_VisibilityOfDefinitions_001() runs on GeneralComp {
	if (c_myconst == 43532) { // c_myconst shall be visible on import when it is explicitly set to public.
		setverdict(pass);
	} else {
		setverdict(fail);
	}
}

control{
    execute(TC_Sem_080205_VisibilityOfDefinitions_001());
}
}

module Sem_080205_VisibilityOfDefinitions_001_import {
	public const integer c_myconst := 32532;
}
 No newline at end of file