Commit 6f7b16a0 authored by Matthias Simon's avatar Matthias Simon
Browse files

Add tests for valuelists

parent 8102607b
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
// @author   TTF23
// @purpose  1:6.5, Ensure common type of value lists is inferred.
// @verdict  pass accept, ttcn3verdict:pass
module Sem_0605_value_lists_001 {

type component GeneralComp {}

testcase TC_Sem_0605_value_lists_001() runs on GeneralComp {
	var a := 1;
	var b := {a, 2};
	var c := {{}, b, {3}};
	if (match(c, {{}, {1,2}, {3}})) {
		setverdict(pass);
	} else {
		setverdict(fail);
	}
}

control {
    execute(TC_Sem_0605_value_lists_001());
}

}
+21 −0
Original line number Diff line number Diff line
// @author   TTF23
// @purpose  1:6.5, Ensure common type of value lists is inferred.
// @verdict  pass accept, ttcn3verdict:pass
module Sem_0605_value_lists_002 {

type component GeneralComp {}

function verifyType(inout universal charstring v) {
	setverdict(pass);
}

testcase TC_Sem_0605_value_lists_002() runs on GeneralComp {
	var v := { "Hello", "Wörld" };
	verifyType(v);
}

control {
    execute(TC_Sem_0605_value_lists_002());
}

}