Loading ATS/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_005.ttcn +10 −4 Original line number Original line Diff line number Diff line Loading @@ -13,15 +13,21 @@ module Sem_050202_Uniqueness_005 { module Sem_050202_Uniqueness_005 { type component GeneralComp { type component GeneralComp { } } type enumerated MyFirstEnumType {MyInt,MySecondEnumValue}; type enumerated MyFirstEnumType {MyInt,MySecondEnumValue}; type integer MyInt; type record MyRec { integer Myint } testcase TC_Sem_050202_Uniqueness_005() runs on GeneralComp { testcase TC_Sem_050202_Uniqueness_005() runs on GeneralComp { var MyFirstEnumType v_enum := MySecondEnumValue; var MyFirstEnumType v_enum := MySecondEnumValue; var MyInt v_int := 1; // local scope var MyRec v_rec; v_rec.Myint := 1; if (match(v_enum,MySecondEnumValue) and match(v_int,1)) { if (match(v_enum,MySecondEnumValue) and match(v_rec.Myint,1)) { setverdict(pass); setverdict(pass); } else { } else { setverdict(fail); setverdict(fail); Loading ATS/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSyn_05040103_parameters_of_kind_timer_002.ttcn +16 −4 Original line number Original line Diff line number Diff line Loading @@ -11,20 +11,32 @@ module NegSyn_05040103_parameters_of_kind_timer_002 { module NegSyn_05040103_parameters_of_kind_timer_002 { type component C { type component C { } } function f_test(out timer p_tmr) { function f_test(out timer p_tmr) { p_tmr.start(1.0); p_tmr.start(1.0); } } testcase TC_NegSyn_05040103_parameters_of_kind_timer_002() runs on C{ testcase TC_NegSyn_05040103_parameters_of_kind_timer_002() runs on C{ timer t_tmr; timer t_tmr; f_test(t_tmr); f_test(t_tmr); t_tmr.timeout t_tmr.timeout; setverdict(pass); setverdict(pass); } } control { control { execute(TC_NegSyn_05040103_parameters_of_kind_timer_002()); execute(TC_NegSyn_05040103_parameters_of_kind_timer_002()); } } } } No newline at end of file ATS/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_001.ttcn +1 −1 Original line number Original line Diff line number Diff line Loading @@ -17,7 +17,7 @@ module NegSem_06010101_AccessStringElements_001 { testcase TC_NegSem_06010101_AccessStringElements_001() runs on GeneralComp { testcase TC_NegSem_06010101_AccessStringElements_001() runs on GeneralComp { var octetstring v_b := '100010'O; var octetstring v_b := '100010'O; v_b[1] := '01'O; //error: only individual elements can be accessed v_b[1] := '11'O; //error: only individual elements can be accessed if (v_b == '100001'O){ if (v_b == '100001'O){ setverdict(pass); setverdict(pass); } } Loading ATS/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_002.ttcn +1 −2 Original line number Original line Diff line number Diff line Loading @@ -27,8 +27,7 @@ module Sem_060203_records_and_sets_of_single_types_002 { [2] := - [2] := - }; }; if (match(v_rec[0], 0) and match(v_rec[1], 1) and not isbound(v_rec[2]) if (match(v_rec[0], 0) and match(v_rec[1], 1) and not isbound(v_rec[2])) { and lengthof (v_rec & {2}) == 4) { setverdict(pass); setverdict(pass); } } else { else { Loading ATS/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_003.ttcn +1 −2 Original line number Original line Diff line number Diff line Loading @@ -27,8 +27,7 @@ module Sem_060203_records_and_sets_of_single_types_003 { [2] := - [2] := - }; }; if (match(v_set[0], 0) and match(v_set[1], 1) and not isbound(v_set[2]) if (match(v_set[0], 0) and match(v_set[1], 1) and not isbound(v_set[2])) { and lengthof (v_set & {2}) == 4) { setverdict(pass); setverdict(pass); } } else { else { Loading Loading
ATS/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_005.ttcn +10 −4 Original line number Original line Diff line number Diff line Loading @@ -13,15 +13,21 @@ module Sem_050202_Uniqueness_005 { module Sem_050202_Uniqueness_005 { type component GeneralComp { type component GeneralComp { } } type enumerated MyFirstEnumType {MyInt,MySecondEnumValue}; type enumerated MyFirstEnumType {MyInt,MySecondEnumValue}; type integer MyInt; type record MyRec { integer Myint } testcase TC_Sem_050202_Uniqueness_005() runs on GeneralComp { testcase TC_Sem_050202_Uniqueness_005() runs on GeneralComp { var MyFirstEnumType v_enum := MySecondEnumValue; var MyFirstEnumType v_enum := MySecondEnumValue; var MyInt v_int := 1; // local scope var MyRec v_rec; v_rec.Myint := 1; if (match(v_enum,MySecondEnumValue) and match(v_int,1)) { if (match(v_enum,MySecondEnumValue) and match(v_rec.Myint,1)) { setverdict(pass); setverdict(pass); } else { } else { setverdict(fail); setverdict(fail); Loading
ATS/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSyn_05040103_parameters_of_kind_timer_002.ttcn +16 −4 Original line number Original line Diff line number Diff line Loading @@ -11,20 +11,32 @@ module NegSyn_05040103_parameters_of_kind_timer_002 { module NegSyn_05040103_parameters_of_kind_timer_002 { type component C { type component C { } } function f_test(out timer p_tmr) { function f_test(out timer p_tmr) { p_tmr.start(1.0); p_tmr.start(1.0); } } testcase TC_NegSyn_05040103_parameters_of_kind_timer_002() runs on C{ testcase TC_NegSyn_05040103_parameters_of_kind_timer_002() runs on C{ timer t_tmr; timer t_tmr; f_test(t_tmr); f_test(t_tmr); t_tmr.timeout t_tmr.timeout; setverdict(pass); setverdict(pass); } } control { control { execute(TC_NegSyn_05040103_parameters_of_kind_timer_002()); execute(TC_NegSyn_05040103_parameters_of_kind_timer_002()); } } } } No newline at end of file
ATS/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_001.ttcn +1 −1 Original line number Original line Diff line number Diff line Loading @@ -17,7 +17,7 @@ module NegSem_06010101_AccessStringElements_001 { testcase TC_NegSem_06010101_AccessStringElements_001() runs on GeneralComp { testcase TC_NegSem_06010101_AccessStringElements_001() runs on GeneralComp { var octetstring v_b := '100010'O; var octetstring v_b := '100010'O; v_b[1] := '01'O; //error: only individual elements can be accessed v_b[1] := '11'O; //error: only individual elements can be accessed if (v_b == '100001'O){ if (v_b == '100001'O){ setverdict(pass); setverdict(pass); } } Loading
ATS/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_002.ttcn +1 −2 Original line number Original line Diff line number Diff line Loading @@ -27,8 +27,7 @@ module Sem_060203_records_and_sets_of_single_types_002 { [2] := - [2] := - }; }; if (match(v_rec[0], 0) and match(v_rec[1], 1) and not isbound(v_rec[2]) if (match(v_rec[0], 0) and match(v_rec[1], 1) and not isbound(v_rec[2])) { and lengthof (v_rec & {2}) == 4) { setverdict(pass); setverdict(pass); } } else { else { Loading
ATS/06_types_and_values/0602_structured_types_and_values/060203_records_and_sets_of_single_types/Sem_060203_records_and_sets_of_single_types_003.ttcn +1 −2 Original line number Original line Diff line number Diff line Loading @@ -27,8 +27,7 @@ module Sem_060203_records_and_sets_of_single_types_003 { [2] := - [2] := - }; }; if (match(v_set[0], 0) and match(v_set[1], 1) and not isbound(v_set[2]) if (match(v_set[0], 0) and match(v_set[1], 1) and not isbound(v_set[2])) { and lengthof (v_set & {2}) == 4) { setverdict(pass); setverdict(pass); } } else { else { Loading