Commit 429d1992 authored by Matthias Simon's avatar Matthias Simon
Browse files

Merge branch '4-automatic-type-for-value-lists' into 'main'

Resolve "Automatic type for value lists"

Closes #4

See merge request k3/ttcn3-conformance-tests!4
parents 8102607b 6f7b16a0
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());
}

}