Loading ATS/core_language/06_types_and_values/0605_automatic_type/Sem_0605_value_lists_001.ttcn 0 → 100644 +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()); } } ATS/core_language/06_types_and_values/0605_automatic_type/Sem_0605_value_lists_002.ttcn 0 → 100644 +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()); } } Loading
ATS/core_language/06_types_and_values/0605_automatic_type/Sem_0605_value_lists_001.ttcn 0 → 100644 +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()); } }
ATS/core_language/06_types_and_values/0605_automatic_type/Sem_0605_value_lists_002.ttcn 0 → 100644 +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()); } }