Commit 88b8197d authored by zeiss's avatar zeiss
Browse files

No commit message

No commit message
parent 4bf43465
Loading
Loading
Loading
Loading
+27 −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 1).
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

module NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_001 {

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
	if (v_str == 'ABCD??E'O) { 
		setverdict(fail);
	} else {
		setverdict(pass);
	}
}

control{
    execute(TC_NegSem_1511_ConcatenatingTemplatesOfStringAndListTypes_001());
}

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

module Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_001 {

type component GeneralComp { }

testcase TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_001() runs on GeneralComp {
	var template charstring v_myChar1 := "ABC" & "D*" & "E?F";
	if (v_myChar1 == "ABCD*E?F") {
		setverdict(pass);
	} else {
		setverdict(fail);
	}
}

control{
    execute(TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_001());
}

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

module Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_002 {

type component GeneralComp { }

testcase TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_002() runs on GeneralComp {
	var template charstring v_myChar1 := "ABC" & * length(2) & "E?F";
	if (v_myChar1 == "ABC??E?F") {
		setverdict(pass);
	} else {
		setverdict(fail);
	}
}

control{
    execute(TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_002());
}

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

module Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_003 {

type component GeneralComp { }

testcase TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_003() runs on GeneralComp {
	var template bitstring v_myBitStr := '010'B & '*'B & '1?1'B;

	if (v_myBitStr == '010*1?1'B) {
		setverdict(pass);
	} else {
		setverdict(fail);
	}
}

control{
    execute(TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_003());
}

}
 No newline at end of file
+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_004 {

type component GeneralComp { }

testcase TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_004() runs on GeneralComp {
	var template octetstring v_str := 'ABC'O & 'D*'O & '?EF'O;

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

control{
    execute(TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_004());
}

}
 No newline at end of file