Commit 1e01b46b authored by Matthias Simon's avatar Matthias Simon
Browse files

Add test for static local templates

parent 0d4ca956
Loading
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
// @verdict pass accept, ttcn3verdict:pass
// @purpose Assure local templates are evaluated statically.
module Templates {

	testcase StaticLocal() runs on C {
		var integer i := 0;
		var integer a[3] := {1,2,3};

		template integer t_integer := a[i];
		i := -1;

		if (match(1, t_integer)) {
			setverdict(pass)
		} else {
			setverdict(fail)
		}
	}

	type component C {}

	control {
		execute(StaticLocal());
	}
}