Commit 2b61cc67 authored by zeiss's avatar zeiss
Browse files

No commit message

No commit message
parent 15271631
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 61 $
 ** @purpose  1:8.2.3.1, Ensure that import all is accepted.
 ** @verdict  pass accept, noexecution
 *****************************************************************/


module Syn_08020301_GeneralFormatOfImport_001 {
	import from Syn_08020301_GeneralFormatOfImport_001_import all;
}

module Syn_08020301_GeneralFormatOfImport_001_import {
	const integer c_myconst := 1;
}
+24 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 61 $
 ** @purpose  1:8.2.3.1, Ensure that import of specific types is accepted.
 ** @verdict  pass accept, noexecution
 *****************************************************************/

module Syn_08020301_GeneralFormatOfImport_002 {
	import from Syn_08020301_GeneralFormatOfImport_001_import {
		type all;
		template all;
		const c_myconst;
		testcase all;
		altstep all;
		function all;
		signature all;
		modulepar all;
	};

}

module Syn_08020301_GeneralFormatOfImport_002_import {
	const integer c_myconst := 1;
}
+30 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 61 $
 ** @purpose  1:8.2.3.2, Ensure that the value of an explicitly imported constant can be read and carries the same value.
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/


module Sem_08020302_ImportingSingleDefinitions_001 {

import from Sem_08020302_ImportingSingleDefinitions_001 {
	const c_myconst;
};

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

control{
    execute(TC_Sem_08020302_ImportingSingleDefinitions_001());
}
}

module Sem_08020302_ImportingSingleDefinitions_001_import {
	const integer c_myconst := 43532;
}
+40 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 61 $
 ** @purpose  1:8.2.3.2, Ensure that the value of an explicitly imported template can be read and carries the same value.
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/


module Sem_08020302_ImportingSingleDefinitions_002 {

import from Sem_08020302_ImportingSingleDefinitions_002 {
	template m_myTemplate;
};

testcase TC_Sem_08020302_ImportingSingleDefinitions_002() runs on GeneralComp {
	if (match(m_myTemplate, {23521, "My String", true})) {
		setverdict(pass);
	} else {
		setverdict(fail);
	}
}

control{
    execute(TC_Sem_08020302_ImportingSingleDefinitions_002());
}
}

module Sem_08020302_ImportingSingleDefinitions_002_import {
	type record MyMessageType {
		integer	field1, 
		charstring field2, 
		boolean field3
	}

	template MyMessageType m_myTemplate := {
		field1 := 23521,
		field2 := "My string", 
		field3 := true
	}
}