Commit 5ff66648 authored by zeiss's avatar zeiss
Browse files

No commit message

No commit message
parent 88b8197d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 150 $
 ** @purpose  1:15.10, Ensure that concatenation of octetstring types works as expected (variant 1).
 ** @purpose  1:15.10, Ensure that concatenation of octetstring types yields an even number of digits.
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

@@ -12,7 +12,7 @@ type component GeneralComp { }
testcase TC_NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_001() runs on GeneralComp {
	var template octetstring v_str := 'ABCD'O & '?'O & '?E'O;

	// shall cause an error as it would denote 9 (i.e., uneven) number of hexdecimal digits
	// shall cause an error as it would denote 9 (i.e., uneven) number of digits
	if (v_str == 'ABCD??E'O) { 
		setverdict(fail);
	} else {
+23 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 150 $
 ** @purpose  1:15.10, Ensure that concatenation of charstrings types yields an error if specified ranges are not fixed length.
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

module NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_002 {

type component GeneralComp { }

testcase TC_NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_002() runs on GeneralComp {
	var template charstring v_str := "ABC" & * length(1..2) & "E?F";

	// shall cause an error as the length attribute should be of fixed length
	setverdict(fail);
}

control{
    execute(TC_NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_002());
}

}
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 150 $
 ** @purpose  1:15.10, Ensure that concatenation of octetstring types works as expected (variant 2).
 ** @purpose  1:15.10, Ensure that concatenation of octetstring types works as expected (variant 1).
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

+26 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 150 $
 ** @purpose  1:15.10, Ensure that concatenation of octetstring types works as expected (variant 2).
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

module Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_005 {

type component GeneralComp { }

testcase TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_005() runs on GeneralComp {
	var template octetstring v_str := 'ABCD'O & * length(2) & 'EF'O;

	if (v_str == 'ABCD??EF'O) {
		setverdict(pass);
	} else {
		setverdict(fail);
	}
}

control{
    execute(TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_005());
}

}
 No newline at end of file
+27 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  $Rev: 150 $
 ** @purpose  1:15.10, Ensure that a concatenation of charstring can be matched.
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

module Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_006 {

type component GeneralComp { }

testcase TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_006() runs on GeneralComp {
	var template charstring m_str := 'ABC' & * length(3) & "E?F";
	var charstring v_value := "ABCXYZE2F";

	if (match(v_value, m_str)) {
		setverdict(pass);
	} else {
		setverdict(fail);
	}
}

control{
    execute(TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_006());
}

}
 No newline at end of file